diff --git a/prompt_fresh_setup b/prompt_fresh_setup index 99544d7..dbfa305 100644 --- a/prompt_fresh_setup +++ b/prompt_fresh_setup @@ -60,6 +60,12 @@ prompt_cleanup() { } fresh_line_one() { + # Clean up if fresh is no longer the current prompt theme + if [[ "`prompt -c | tail -1 | xargs`" != "fresh" ]]; then + add-zsh-hook -d precmd fresh_line_one + return + fi + # First get the last commands exit code before doing anything local exit_code=$?