From d69f2850afc189310b40141c839480b42f71775c Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 7 Oct 2016 23:54:54 +0200 Subject: [PATCH] Add non 0 exit code for missing jump targets (#5500) This allows for the user to combine the jump command with something else. In my example cd and jump are now combined like this: ```bash jumpcd() { jump $1 > /dev/null || cd $1 } alias cd="jumpcd" ``` --- plugins/jump/jump.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh index e58e7373d..86d9553a2 100644 --- a/plugins/jump/jump.plugin.zsh +++ b/plugins/jump/jump.plugin.zsh @@ -9,7 +9,7 @@ export MARKPATH=$HOME/.marks jump() { - cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1" + cd -P "$MARKPATH/$1" 2>/dev/null || {echo "No such mark: $1"; return 1} } mark() {