mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Fix no jump when query begins with - in Zsh
Without this commit, the following command prints the path found by autojump, but doesn't actually jump because the Zsh script assumes we're passing an option to j(): j -- -tools The -- is needed; otherwise `-tools` would be interpreted as a (bad) autojump option.
This commit is contained in:
parent
b60932616b
commit
d12378fc15
@ -42,7 +42,7 @@ chpwd_functions+=autojump_chpwd
|
|||||||
|
|
||||||
# default autojump command
|
# default autojump command
|
||||||
j() {
|
j() {
|
||||||
if [[ ${@} == -* ]]; then
|
if [[ ${@} == -* && ! (${#} -eq 2 && ${1} == '--') ]]; then
|
||||||
autojump ${@}
|
autojump ${@}
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user