From dc75ae79fe1c71544f9c138e16d028bd1cbb0b34 Mon Sep 17 00:00:00 2001 From: cschantz Date: Tue, 11 Nov 2025 17:53:19 -0500 Subject: [PATCH] Use same grep logic as trace eraser for history cleaning Simplified to match the exact logic from erase-toolkit-traces.sh: - Use grep -Ev with pattern matching - Clean file, clear history, reload, unset HISTFILE - Then run trace eraser subprocess for logs/files/directory The key fix is running this in the current shell instead of subprocess. --- launcher.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher.sh b/launcher.sh index 120537b..2ed25d3 100755 --- a/launcher.sh +++ b/launcher.sh @@ -1511,7 +1511,7 @@ main() { # This ensures the parent shell's history is cleaned GREP_PATTERN="git\.mull\.lol|linux-server-management-toolkit|server-toolkit|launcher\.sh|erase-toolkit-traces" - # Clean the history file + # Clean the history file (same logic as trace eraser) if [ -f ~/.bash_history ]; then cp ~/.bash_history ~/.bash_history.bak.$$ grep -Ev "$GREP_PATTERN" ~/.bash_history.bak.$$ > ~/.bash_history 2>/dev/null || true