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" ```
This commit is contained in:
parent
7f9b773350
commit
d69f2850af
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user