Browse Source

Update scripts to use version agnostic pattern matching and corresponding documentation.

pull/131/head
William Ting 12 years ago
parent
commit
183fa795d7
4 changed files with 12 additions and 14 deletions
  1. +3
    -1
      README.md
  2. +4
    -11
      bin/autojump.zsh
  3. +4
    -1
      docs/autojump.1
  4. +1
    -1
      docs/body.md

+ 3
- 1
README.md View File

@ -189,7 +189,9 @@ ADVANCED USAGE
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)

+ 4
- 11
bin/autojump.zsh View File

@ -35,17 +35,10 @@ typeset -ga preexec_functions
preexec_functions+=autojump_preexec
function j {
if is-at-least 4.3.5; then
if [[ ${@} =~ -.* ]]; then
autojump ${@}
return
fi
else
if [[ ${@} -pcre-match -.* ]]; then
autojump ${@}
return
fi
fi
if [[ ${@} == -* ]]; then
autojump ${@}
return
fi
local new_path="$(autojump $@)"
if [ -d "${new_path}" ]; then

+ 4
- 1
docs/autojump.1 View File

@ -121,7 +121,10 @@ All negative key weights are purged automatically.
.RE
.SS KNOWN ISSUES
.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
zsh (bug #86)
.RS 2

+ 1
- 1
docs/body.md View File

@ -48,7 +48,7 @@ Options must be passed to 'autojump' and not the 'j' wrapper function.
## 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)

Loading…
Cancel
Save