mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Update scripts to use version agnostic pattern matching and corresponding documentation.
This commit is contained in:
parent
1b765ab8a6
commit
183fa795d7
@ -189,7 +189,9 @@ ADVANCED USAGE
|
|||||||
KNOWN ISSUES
|
KNOWN ISSUES
|
||||||
------------
|
------------
|
||||||
|
|
||||||
- Does not support directories that begin with `-`.
|
- The jump function `j` does not support directories that begin with
|
||||||
|
`-`. If you want to jump a directory called `--music`, try using
|
||||||
|
`j music` instead of `j --music`.
|
||||||
|
|
||||||
- zsh (bug \#86)
|
- zsh (bug \#86)
|
||||||
|
|
||||||
|
@ -35,17 +35,10 @@ typeset -ga preexec_functions
|
|||||||
preexec_functions+=autojump_preexec
|
preexec_functions+=autojump_preexec
|
||||||
|
|
||||||
function j {
|
function j {
|
||||||
if is-at-least 4.3.5; then
|
if [[ ${@} == -* ]]; then
|
||||||
if [[ ${@} =~ -.* ]]; then
|
autojump ${@}
|
||||||
autojump ${@}
|
return
|
||||||
return
|
fi
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [[ ${@} -pcre-match -.* ]]; then
|
|
||||||
autojump ${@}
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
local new_path="$(autojump $@)"
|
local new_path="$(autojump $@)"
|
||||||
if [ -d "${new_path}" ]; then
|
if [ -d "${new_path}" ]; then
|
||||||
|
@ -121,7 +121,10 @@ All negative key weights are purged automatically.
|
|||||||
.RE
|
.RE
|
||||||
.SS KNOWN ISSUES
|
.SS KNOWN ISSUES
|
||||||
.IP \[bu] 2
|
.IP \[bu] 2
|
||||||
Does not support directories that begin with \f[C]-\f[].
|
The jump function \f[C]j\f[] does not support directories that begin
|
||||||
|
with \f[C]-\f[].
|
||||||
|
If you want to jump a directory called \f[C]--music\f[], try using
|
||||||
|
\f[C]j\ music\f[] instead of \f[C]j\ --music\f[].
|
||||||
.IP \[bu] 2
|
.IP \[bu] 2
|
||||||
zsh (bug #86)
|
zsh (bug #86)
|
||||||
.RS 2
|
.RS 2
|
||||||
|
@ -48,7 +48,7 @@ Options must be passed to 'autojump' and not the 'j' wrapper function.
|
|||||||
|
|
||||||
## KNOWN ISSUES
|
## KNOWN ISSUES
|
||||||
|
|
||||||
- Does not support directories that begin with `-`.
|
- The jump function `j` does not support directories that begin with `-`. If you want to jump a directory called `--music`, try using `j music` instead of `j --music`.
|
||||||
|
|
||||||
- zsh (bug #86)
|
- zsh (bug #86)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user