diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-06-07 06:47:40 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-06-07 06:47:40 +0000 |
commit | 6bdaf4e1745e78993c72660dea12b06e9aeece17 (patch) | |
tree | b081046b106b6c96e9f7c130cb5086df4d064161 | |
parent | aafc585164371de74cafb68428b827a396043c1b (diff) | |
download | zsh-6bdaf4e1745e78993c72660dea12b06e9aeece17.tar.gz zsh-6bdaf4e1745e78993c72660dea12b06e9aeece17.tar.xz zsh-6bdaf4e1745e78993c72660dea12b06e9aeece17.zip |
setup options in bindable commands (11789)
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Completion/Commands/_correct_word | 17 | ||||
-rw-r--r-- | Completion/Commands/_expand_word | 3 | ||||
-rw-r--r-- | Completion/Commands/_next_tags | 3 |
4 files changed, 25 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index adcbd207e..2d2466c36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-06-07 Sven Wischnowsky <wischnow@zsh.org> + + * 11789: Completion/Commands/_correct_word, + Completion/Commands/_expand_word, Completion/Commands/_next_tags: + setup options in bindable commands + 2000-06-06 Oliver Kiddle <opk@zsh.org> * 11772: Completion/User/_urls: improvements to 11756 suggested by diff --git a/Completion/Commands/_correct_word b/Completion/Commands/_correct_word index db3023860..2d8d3065a 100644 --- a/Completion/Commands/_correct_word +++ b/Completion/Commands/_correct_word @@ -3,10 +3,19 @@ # Simple completion front-end implementing spelling correction. # The maximum number of errors is set quite high, and # the numeric prefix can be used to specify a different value. +# +# If configurations keys with the prefix `correctword_' are +# given they override those starting with `correct_'. -local oca="$compconfig[correct_accept]" -compconfig[correct_accept]=6n +setopt localoptions nullglob rcexpandparam extendedglob +unsetopt markdirs globsubst shwordsplit nounset ksharrays -_main_complete _correct +local curcontext="$curcontext" + +if [[ -z "$curcontext" ]]; then + curcontext="correct-word:::" +else + curcontext="correct-word:${curcontext#*:}" +fi -compconfig[correct_accept]=$oca +_main_complete _correct diff --git a/Completion/Commands/_expand_word b/Completion/Commands/_expand_word index 9b71dc830..c105e0322 100644 --- a/Completion/Commands/_expand_word +++ b/Completion/Commands/_expand_word @@ -2,6 +2,9 @@ # Simple completion front-end implementing expansion. +setopt localoptions nullglob rcexpandparam extendedglob +unsetopt markdirs globsubst shwordsplit nounset ksharrays + local curcontext="$curcontext" if [[ -z "$curcontext" ]]; then diff --git a/Completion/Commands/_next_tags b/Completion/Commands/_next_tags index eb20494d7..8afaa16f3 100644 --- a/Completion/Commands/_next_tags +++ b/Completion/Commands/_next_tags @@ -3,6 +3,9 @@ # Main widget. _next_tags() { + setopt localoptions nullglob rcexpandparam extendedglob + unsetopt markdirs globsubst shwordsplit nounset ksharrays + local ins ops="$PREFIX$SUFFIX" unfunction _all_labels _next_label |