diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2000-09-21 05:16:21 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2000-09-21 05:16:21 +0000 |
commit | 430e2947951207e45b02ba1ebc04586d06ade021 (patch) | |
tree | 16065657ed82782f8954b9de56d48d91865f87b3 /Completion/Commands | |
parent | 5637f95bc0f86a37f2ef4052c3e9c155dd1e6494 (diff) | |
download | zsh-430e2947951207e45b02ba1ebc04586d06ade021.tar.gz zsh-430e2947951207e45b02ba1ebc04586d06ade021.tar.xz zsh-430e2947951207e45b02ba1ebc04586d06ade021.zip |
Fiddle with _expand_word and its doc.
Diffstat (limited to 'Completion/Commands')
-rw-r--r-- | Completion/Commands/_expand_word | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Completion/Commands/_expand_word b/Completion/Commands/_expand_word index fddd065ee..4ff24c3f5 100644 --- a/Completion/Commands/_expand_word +++ b/Completion/Commands/_expand_word @@ -6,6 +6,7 @@ setopt localoptions nullglob rcexpandparam extendedglob noshglob unsetopt markdirs globsubst shwordsplit nounset ksharrays local curcontext="$curcontext" +local -ah completers if [[ -z "$curcontext" ]]; then curcontext="expand-word:::" @@ -13,4 +14,12 @@ else curcontext="expand-word:${curcontext#*:}" fi -_main_complete _expand +if zstyle -t ":completion:${curcontext}:" completions; then + zstyle -a ":completion:${curcontext}:" completer completers + completers[1,(i)_expand]=_expand + (( $#completers == 1 )) && completers=(_expand _complete) +else + completers=(_expand) +fi + +_main_complete $completers |