Simplify exit cleanup - one question, full cleanup

Changes:
- Single question on exit: 'Clean history and remove traces?'
- If yes: runs full trace eraser automatically
- Auto mode skips all prompts, removes everything
- TRACE_ERASER_AUTO=yes flag for non-interactive mode

User experience:
- Exit (0)
- One question
- If yes: everything cleaned and removed automatically
- No multiple prompts
This commit is contained in:
cschantz
2025-11-11 17:46:52 -05:00
parent cd017bb099
commit 0ed04c2488
2 changed files with 42 additions and 38 deletions
+3 -5
View File
@@ -1504,13 +1504,11 @@ main() {
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
read -p "Clean history and remove traces? (yes/no): " clean_hist
if [ "$clean_hist" = "yes" ]; then
bash "$BASE_DIR/tools/erase-toolkit-traces.sh"
# Run trace eraser in non-interactive mode
TRACE_ERASER_AUTO=yes bash "$BASE_DIR/tools/erase-toolkit-traces.sh"
fi
echo ""