mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
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"
```
This commit is contained in:
parent
99dbf322da
commit
f38b832da5
1 changed files with 1 additions and 1 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue