Browse Source

update shell scripts to use new tab completion argument --complete, update docs with new --preserve option

pull/125/head
William Ting 12 years ago
parent
commit
6a16a7ec67
5 changed files with 12 additions and 6 deletions
  1. +3
    -1
      README.md
  2. +1
    -1
      bin/_j
  3. +2
    -2
      bin/autojump.bash
  4. +3
    -1
      docs/autojump.1
  5. +3
    -1
      docs/body.md

+ 3
- 1
README.md View File

@ -114,6 +114,8 @@ Options must be passed to 'autojump' and not the 'j' wrapper function.
-a, --add DIR manually add path to database -a, --add DIR manually add path to database
--preserve prevent key weight decay over time
--stat show database entries and their key weights --stat show database entries and their key weights
--version show version information and exit --version show version information and exit
@ -123,7 +125,7 @@ INTERNAL OPTIONS
-b, --bash enclose directory with quotes to prevent errors -b, --bash enclose directory with quotes to prevent errors
--completion prevent key weight decay over time
--complete used for tab completion
ADVANCED USAGE ADVANCED USAGE
-------------- --------------

+ 1
- 1
bin/_j View File

@ -1,6 +1,6 @@
#compdef j #compdef j
cur=${words[2, -1]} cur=${words[2, -1]}
autojump --completion ${=cur[*]} | while read i; do
autojump --complete ${=cur[*]} | while read i; do
compadd -U "$i"; compadd -U "$i";
done done

+ 2
- 2
bin/autojump.bash View File

@ -2,7 +2,7 @@ _autojump()
{ {
local cur local cur
cur=${COMP_WORDS[*]:1} cur=${COMP_WORDS[*]:1}
comps=$(autojump --bash --completion $cur)
comps=$(autojump --bash --complete $cur)
while read i while read i
do do
COMPREPLY=("${COMPREPLY[@]}" "${i}") COMPREPLY=("${COMPREPLY[@]}" "${i}")
@ -18,7 +18,7 @@ _autojump_files()
local cur local cur
#cur=${COMP_WORDS[*]:1} #cur=${COMP_WORDS[*]:1}
cur=${COMP_WORDS[COMP_CWORD]} cur=${COMP_WORDS[COMP_CWORD]}
comps=$(autojump --bash --completion $cur)
comps=$(autojump --bash --complete $cur)
while read i while read i
do do
COMPREPLY=("${COMPREPLY[@]}" "${i}") COMPREPLY=("${COMPREPLY[@]}" "${i}")

+ 3
- 1
docs/autojump.1 View File

@ -35,6 +35,8 @@ wrapper function.
\f[C] \f[C]
-a,\ --add\ DIR\ \ \ \ \ \ \ manually\ add\ path\ to\ database -a,\ --add\ DIR\ \ \ \ \ \ \ manually\ add\ path\ to\ database
--preserve\ \ \ \ \ \ \ \ \ \ prevent\ key\ weight\ decay\ over\ time
--stat\ \ \ \ \ \ \ \ \ \ \ \ \ \ show\ database\ entries\ and\ their\ key\ weights --stat\ \ \ \ \ \ \ \ \ \ \ \ \ \ show\ database\ entries\ and\ their\ key\ weights
--version\ \ \ \ \ \ \ \ \ \ \ show\ version\ information\ and\ exit --version\ \ \ \ \ \ \ \ \ \ \ show\ version\ information\ and\ exit
@ -46,7 +48,7 @@ wrapper function.
\f[C] \f[C]
-b,\ --bash\ \ \ \ \ \ \ \ \ \ enclose\ directory\ with\ quotes\ to\ prevent\ errors -b,\ --bash\ \ \ \ \ \ \ \ \ \ enclose\ directory\ with\ quotes\ to\ prevent\ errors
--completion\ \ \ \ \ \ \ \ prevent\ key\ weight\ decay\ over\ time
--complete\ \ \ \ \ \ \ \ \ \ used\ for\ tab\ completion
\f[] \f[]
.fi .fi
.SS ADVANCED USAGE .SS ADVANCED USAGE

+ 3
- 1
docs/body.md View File

@ -4,6 +4,8 @@ Options must be passed to 'autojump' and not the 'j' wrapper function.
-a, --add DIR manually add path to database -a, --add DIR manually add path to database
--preserve prevent key weight decay over time
--stat show database entries and their key weights --stat show database entries and their key weights
--version show version information and exit --version show version information and exit
@ -12,7 +14,7 @@ Options must be passed to 'autojump' and not the 'j' wrapper function.
-b, --bash enclose directory with quotes to prevent errors -b, --bash enclose directory with quotes to prevent errors
--completion prevent key weight decay over time
--complete used for tab completion
## ADVANCED USAGE ## ADVANCED USAGE

Loading…
Cancel
Save