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 | |
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')
-rw-r--r-- | Completion/Commands/_expand_word | 11 | ||||
-rw-r--r-- | Completion/Core/_expand | 1 |
2 files changed, 10 insertions, 2 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 diff --git a/Completion/Core/_expand b/Completion/Core/_expand index 9e7d3d122..d47251c5a 100644 --- a/Completion/Core/_expand +++ b/Completion/Core/_expand @@ -23,7 +23,6 @@ local exp word sort expr expl subd suf=" " force opt asp tmp opre pre epre if [[ "$force" = *c* ]] || zstyle -t ":completion:${curcontext}:" completions; then compstate[insert]=all - [[ "$curcontext" = expand-word:* ]] && _complete && return 0 return 1 fi |