diff --git a/tools/erase-toolkit-traces.sh b/tools/erase-toolkit-traces.sh index 685c5f0..8182891 100755 --- a/tools/erase-toolkit-traces.sh +++ b/tools/erase-toolkit-traces.sh @@ -167,11 +167,15 @@ if [ "$CLEAN_HISTORY" = true ] && [ -f ~/.bash_history ]; then echo " ✓ History file cleaned" fi + # Reload cleaned history into current session to prevent re-adding on exit + echo " → Reloading cleaned history into current session..." + history -c + history -r + echo " ✓ In-memory history reloaded from cleaned file" echo "" - echo "NOTE: Other active terminal sessions may still have old history in memory." - echo " Run 'exec bash' or 'history -c && history -r' in those terminals," - echo " or simply logout/login to start completely fresh." + echo "NOTE: For complete cleanup, run 'exec bash' to start a fresh shell." + echo " This prevents any lingering history from being re-saved." fi # Offer to remove the entire toolkit (AFTER history cleaning)