Add history cleaning prompt on exit
Changes: - Prompt user to clean history when selecting Exit (0) - Runs trace eraser if user answers 'yes' - Shows clear message about what will be cleaned User experience: - Exit from main menu - Asked: 'Clean history? (yes/no)' - If yes: runs full trace eraser - Then exits normally
This commit is contained in:
+10
@@ -1503,6 +1503,16 @@ main() {
|
|||||||
9) edit_config ;;
|
9) edit_config ;;
|
||||||
10) bash "$BASE_DIR/tools/erase-toolkit-traces.sh" ;;
|
10) bash "$BASE_DIR/tools/erase-toolkit-traces.sh" ;;
|
||||||
0)
|
0)
|
||||||
|
echo ""
|
||||||
|
echo -e "${YELLOW}Clean bash history before exiting?${NC}"
|
||||||
|
echo "This will remove all toolkit-related commands from history."
|
||||||
|
echo ""
|
||||||
|
read -p "Clean history? (yes/no): " clean_hist
|
||||||
|
|
||||||
|
if [ "$clean_hist" = "yes" ]; then
|
||||||
|
bash "$BASE_DIR/tools/erase-toolkit-traces.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${GREEN}Thanks for using Server Management Toolkit!${NC}"
|
echo -e "${GREEN}Thanks for using Server Management Toolkit!${NC}"
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in New Issue
Block a user