From f38b832da5844d47b047af4ef6adda5083f2a4bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Spiekerk=C3=B6tter?= Date: Fri, 7 Oct 2016 10:42:04 +0200 Subject: [PATCH] Add non 0 exit code for missing jump targets 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..3dfa8d8d3 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() {