From abe049d5f402796e588b52bf9192ca998f18e8b3 Mon Sep 17 00:00:00 2001 From: Tom Moulard Date: Fri, 14 Aug 2020 18:56:25 +0200 Subject: [PATCH] Prevent zoxide from changing $? in $PROMPT_COMMAND --- src/subcommand/init/shell/bash.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subcommand/init/shell/bash.rs b/src/subcommand/init/shell/bash.rs index c142108..3304db2 100644 --- a/src/subcommand/init/shell/bash.rs +++ b/src/subcommand/init/shell/bash.rs @@ -37,7 +37,7 @@ _zoxide_hook() { case "$PROMPT_COMMAND" in *_zoxide_hook*) ;; - *) PROMPT_COMMAND="_zoxide_hook${PROMPT_COMMAND:+;${PROMPT_COMMAND}}" ;; + *) PROMPT_COMMAND="${PROMPT_COMMAND:+${PROMPT_COMMAND};}_zoxide_hook" ;; esac "#;