From ec30a0bfbae9f0883b7d37ed65e184b7d10c8879 Mon Sep 17 00:00:00 2001 From: Tom Moulard Date: Fri, 14 Aug 2020 15:28:43 +0200 Subject: [PATCH] running hook after prompt function to use $? in $PS1 --- 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 "#;