From cd017bb099a38bf902a20b54a24f6a6412e72664 Mon Sep 17 00:00:00 2001 From: cschantz Date: Tue, 11 Nov 2025 17:44:42 -0500 Subject: [PATCH] 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 --- launcher.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/launcher.sh b/launcher.sh index 8984460..ab242f2 100755 --- a/launcher.sh +++ b/launcher.sh @@ -1503,6 +1503,16 @@ main() { 9) edit_config ;; 10) bash "$BASE_DIR/tools/erase-toolkit-traces.sh" ;; 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 -e "${GREEN}Thanks for using Server Management Toolkit!${NC}" echo ""