From 6a16a7ec6711ff52abfdb33477c4d43e6189011c Mon Sep 17 00:00:00 2001 From: William Ting Date: Sun, 6 May 2012 15:17:33 -1000 Subject: [PATCH] update shell scripts to use new tab completion argument --complete, update docs with new --preserve option --- README.md | 4 +++- bin/_j | 2 +- bin/autojump.bash | 4 ++-- docs/autojump.1 | 4 +++- docs/body.md | 4 +++- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 070b836..8ac14a2 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,8 @@ Options must be passed to 'autojump' and not the 'j' wrapper function. -a, --add DIR manually add path to database + --preserve prevent key weight decay over time + --stat show database entries and their key weights --version show version information and exit @@ -123,7 +125,7 @@ INTERNAL OPTIONS -b, --bash enclose directory with quotes to prevent errors - --completion prevent key weight decay over time + --complete used for tab completion ADVANCED USAGE -------------- diff --git a/bin/_j b/bin/_j index 55eb7f2..6cbd600 100644 --- a/bin/_j +++ b/bin/_j @@ -1,6 +1,6 @@ #compdef j cur=${words[2, -1]} -autojump --completion ${=cur[*]} | while read i; do +autojump --complete ${=cur[*]} | while read i; do compadd -U "$i"; done diff --git a/bin/autojump.bash b/bin/autojump.bash index bc0831f..32f4466 100644 --- a/bin/autojump.bash +++ b/bin/autojump.bash @@ -2,7 +2,7 @@ _autojump() { local cur cur=${COMP_WORDS[*]:1} - comps=$(autojump --bash --completion $cur) + comps=$(autojump --bash --complete $cur) while read i do COMPREPLY=("${COMPREPLY[@]}" "${i}") @@ -18,7 +18,7 @@ _autojump_files() local cur #cur=${COMP_WORDS[*]:1} cur=${COMP_WORDS[COMP_CWORD]} - comps=$(autojump --bash --completion $cur) + comps=$(autojump --bash --complete $cur) while read i do COMPREPLY=("${COMPREPLY[@]}" "${i}") diff --git a/docs/autojump.1 b/docs/autojump.1 index 213d213..d63642c 100644 --- a/docs/autojump.1 +++ b/docs/autojump.1 @@ -35,6 +35,8 @@ wrapper function. \f[C] -a,\ --add\ DIR\ \ \ \ \ \ \ manually\ add\ path\ to\ database +--preserve\ \ \ \ \ \ \ \ \ \ prevent\ key\ weight\ decay\ over\ time + --stat\ \ \ \ \ \ \ \ \ \ \ \ \ \ show\ database\ entries\ and\ their\ key\ weights --version\ \ \ \ \ \ \ \ \ \ \ show\ version\ information\ and\ exit @@ -46,7 +48,7 @@ wrapper function. \f[C] -b,\ --bash\ \ \ \ \ \ \ \ \ \ enclose\ directory\ with\ quotes\ to\ prevent\ errors ---completion\ \ \ \ \ \ \ \ prevent\ key\ weight\ decay\ over\ time +--complete\ \ \ \ \ \ \ \ \ \ used\ for\ tab\ completion \f[] .fi .SS ADVANCED USAGE diff --git a/docs/body.md b/docs/body.md index 9da99e1..d6bef30 100644 --- a/docs/body.md +++ b/docs/body.md @@ -4,6 +4,8 @@ Options must be passed to 'autojump' and not the 'j' wrapper function. -a, --add DIR manually add path to database + --preserve prevent key weight decay over time + --stat show database entries and their key weights --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 - --completion prevent key weight decay over time + --complete used for tab completion ## ADVANCED USAGE