diff options
Diffstat (limited to 'Completion/Base/Completer/_user_expand')
-rw-r--r-- | Completion/Base/Completer/_user_expand | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Completion/Base/Completer/_user_expand b/Completion/Base/Completer/_user_expand index cf3d172f0..ee39bb176 100644 --- a/Completion/Base/Completer/_user_expand +++ b/Completion/Base/Completer/_user_expand @@ -27,7 +27,7 @@ exp=("$word") # Now look for user completions. -zstyle -a ":completion:${curcontext}" user-expand specs || return 1 +zstyle -a ":completion:${curcontext}:" user-expand specs || return 1 for spec in $specs; do REPLY= @@ -95,7 +95,7 @@ if [[ -z "$compstate[insert]" ]] ;then else _tags all-expansions expansions original - if [[ $#exp -gt 1 ]] && _requested expansions; then + if [[ $#exp -ge 1 ]] && _requested expansions; then local i j normal space dir if [[ "$sort" = menu ]]; then @@ -121,9 +121,14 @@ else (( $#space )) && compadd "$expl[@]" -UQ -qS " " -a space (( $#normal )) && compadd "$expl[@]" -UQ -qS "" -a normal fi - if _requested all-expansions expl "all expansions${REPLY:+: $REPLY}"; then + if _requested all-expansions; then local disp dstr + if [[ "$sort" = menu ]]; then + _description all-expansions expl "all expansions${REPLY:+: $REPLY}" "o:$word" + else + _description -V all-expansions expl "all expansions${REPLY:+: $REPLY}" "o:$word" + fi if [[ "${#${exp}}" -ge COLUMNS ]]; then disp=( -ld dstr ) dstr=( "${(r:COLUMNS-5:)exp} ..." ) |