From f844c87a4d676bcc8ad7ac24b5132d7aa5ccfeca Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 1 Dec 1999 15:29:41 +0000 Subject: zsh-workers/8840 --- Completion/Base/_arguments | 4 ++-- Completion/Base/_brace_parameter | 26 -------------------------- Completion/Base/_describe | 2 +- Completion/Base/_first | 6 +++--- Completion/Base/_jobs | 6 +++--- Completion/Base/_subscript | 2 +- Completion/Base/_tilde | 2 +- Completion/Base/_values | 2 +- 8 files changed, 12 insertions(+), 38 deletions(-) (limited to 'Completion/Base') diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments index 031ed90cf..0170ce307 100644 --- a/Completion/Base/_arguments +++ b/Completion/Base/_arguments @@ -194,7 +194,7 @@ if comparguments -i "$autod" "$@"; then while true; do while _tags; do if [[ -n "$matched" ]] || _requested arguments; then - _description expl "$descr" + _description arguments expl "$descr" if [[ "$action" = -\>* ]]; then comparguments -W line opt_args @@ -268,7 +268,7 @@ if comparguments -i "$autod" "$@"; then if comparguments -s single; then - _description expl option + _description options expl option if [[ "$single" = direct ]]; then compadd "$expl[@]" -QS '' - "${PREFIX}${SUFFIX}" diff --git a/Completion/Base/_brace_parameter b/Completion/Base/_brace_parameter index 2268b0068..a6892d944 100644 --- a/Completion/Base/_brace_parameter +++ b/Completion/Base/_brace_parameter @@ -1,29 +1,3 @@ #compdef -brace-parameter- _tags parameters && _parameters -e - - -# Without the `-e' option, we would use the following (see the file -# Core/_parameters for more enlightenment). - -# local lp ls n q - -# if [[ "$SUFFIX" = *\}* ]]; then -# ISUFFIX="${SUFFIX#*\}}$ISUFFIX" -# SUFFIX="${SUFFIX%%\}*}" -# suf=() -# elif [[ "$LBUFFER" = *\$\{[^}]#\$\{[^}]#$PREFIX || -# "$compstate[insert]" = *menu* ]]; then -# suf=(-b '') -# else -# suf=(-b ' ') -# fi - -# lp="$LBUFFER[1,-${#PREFIX}-1]" -# ls="$RBUFFER[${#SUFFIX}+1,-1]" -# n=${(M)#ls##\"#} -# q=${(M)lp%%\"#} - -# [[ n -gt 0 ]] && suf='' - -# _parameters "$suf[@]" -Qs "${q[1,-n-1]}" -r '-:?#%+=[/}' diff --git a/Completion/Base/_describe b/Completion/Base/_describe index 3d0d8507c..7be7ea29f 100644 --- a/Completion/Base/_describe +++ b/Completion/Base/_describe @@ -18,7 +18,7 @@ _tags "$_type" || return 1 _style "$_type" verbose && _showd=yes -_description _expl "$1" +_description "$_type" _expl "$1" shift if [[ -n "$_showd" ]]; then diff --git a/Completion/Base/_first b/Completion/Base/_first index 0e281d061..6740c00c5 100644 --- a/Completion/Base/_first +++ b/Completion/Base/_first @@ -34,7 +34,7 @@ # completion of words from the history by adding two commas at the end # and hitting TAB. # -# if [[ "$PREFIX" = *,, ]]; then +# if [[ "$PREFIX" = *,, ]] && _tags history-words; then # local max i=1 expl # # PREFIX="$PREFIX[1,-2]" @@ -51,9 +51,9 @@ # # twenty words, and so on... # while [[ i -le max ]]; do # if _style history-words sort; then -# _description expl "history ($n)" +# _description history-words expl "history ($n)" # else -# _description -V expl "history ($n)" +# _description -V history-words expl "history ($n)" # fi # if compadd "$expl[@]" -Q - \ # "${(@)${(@)historywords:#[\$'\"]*}[1,i*10]}"; then diff --git a/Completion/Base/_jobs b/Completion/Base/_jobs index 2a1b725b4..addc88607 100644 --- a/Completion/Base/_jobs +++ b/Completion/Base/_jobs @@ -11,15 +11,15 @@ _style jobs verbose && desc=yes if [[ "$1" = -r ]]; then jids=( "${(@k)jobstates[(R)running*]}" ) shift - _description expl 'running job' + _description jobs expl 'running job' elif [[ "$1" = -s ]]; then jids=( "${(@k)jobstates[(R)running*]}" ) shift - _description expl 'suspended job' + _description jobs expl 'suspended job' else [[ "$1" = - ]] && shift jids=( "${(@k)jobtexts}" ) - _description expl job + _description jobs expl job fi if [[ -n "$desc" ]]; then diff --git a/Completion/Base/_subscript b/Completion/Base/_subscript index cc3e9c435..21e62e8aa 100644 --- a/Completion/Base/_subscript +++ b/Completion/Base/_subscript @@ -19,7 +19,7 @@ elif [[ ${(Pt)${compstate[parameter]}} = array* ]]; then _tags indexes parameters while _tags; do - if _requested indexes -V expl 'array index'; then + if _requested -V indexes expl 'array index'; then ind=( {1..${#${(P)${compstate[parameter]}}}} ) if _style indexes verbose; then list=() diff --git a/Completion/Base/_tilde b/Completion/Base/_tilde index d9eb0a887..4aceca6ce 100644 --- a/Completion/Base/_tilde +++ b/Completion/Base/_tilde @@ -21,7 +21,7 @@ while _tags; do _requested named-directories expl 'named directory' && compadd "$suf[@]" "$expl[@]" "$@" - "${(@k)nameddirs}" - if _requested directory-stack -V expl 'directory stack' && + if _requested -V directory-stack expl 'directory stack' && { ! _style directory-stack prefix-needed || [[ "$PREFIX" = [-+]* ]] }; then if _style directory-stack verbose; then diff --git a/Completion/Base/_values b/Completion/Base/_values index eded48363..f35aa5a9a 100644 --- a/Completion/Base/_values +++ b/Completion/Base/_values @@ -76,7 +76,7 @@ if compvalues -i "$@"; then return 1 fi - _description expl "$descr" + _description arguments expl "$descr" # We add the separator character as a autoremovable suffix unless # we have only one possible value left. -- cgit 1.4.1