Commit d69f2850 authored by diego's avatar diego Committed by Marc Cornellà
Browse files

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"
```
parent 7f9b7733
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
export MARKPATH=$HOME/.marks export MARKPATH=$HOME/.marks
jump() { 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() { mark() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment