d69f2850afc189310b40141c839480b42f71775c

Author
diego <sirdiego@users.noreply.github.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

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"
```

Diff

 1diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh
 2index e58e7373dec677429dd1f4af43ae8a7368a56c9d..86d9553a26647299b5fa9255cea9c92635baa91c 100644
 3--- a/plugins/jump/jump.plugin.zsh
 4+++ b/plugins/jump/jump.plugin.zsh
 5@@ -9,7 +9,7 @@
 6 export MARKPATH=$HOME/.marks
 7 
 8 jump() {
 9-	cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1"
10+	cd -P "$MARKPATH/$1" 2>/dev/null || {echo "No such mark: $1"; return 1}
11 }
12 
13 mark() {