浏览代码

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"
```
diego 8 年之前
父节点
当前提交
d69f2850af
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/jump/jump.plugin.zsh

+ 1 - 1
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() {