diff options
Diffstat (limited to 'Completion/Base')
-rw-r--r-- | Completion/Base/_arguments | 4 | ||||
-rw-r--r-- | Completion/Base/_combination | 2 | ||||
-rw-r--r-- | Completion/Base/_describe | 5 | ||||
-rw-r--r-- | Completion/Base/_first | 2 | ||||
-rw-r--r-- | Completion/Base/_jobs | 9 | ||||
-rw-r--r-- | Completion/Base/_regex_arguments | 2 | ||||
-rw-r--r-- | Completion/Base/_subscript | 4 | ||||
-rw-r--r-- | Completion/Base/_tilde | 4 |
8 files changed, 17 insertions, 15 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments index 591cb6ac7..16293a098 100644 --- a/Completion/Base/_arguments +++ b/Completion/Base/_arguments @@ -162,7 +162,7 @@ while [[ "$1" = -(O*|C) ]]; do esac done -_style -s options auto-description autod +zstyle -s ":completion${curcontext}:options" auto-description autod if (( $# )) && comparguments -i "$autod" "$@"; then local nm="$compstate[nmatches]" action noargs aret expl local @@ -258,7 +258,7 @@ if (( $# )) && comparguments -i "$autod" "$@"; then fi if [[ -z "$matched" ]] && _requested options && - { ! _style options prefix-needed || + { ! zstyle -t ":completion${curcontext}:options" prefix-needed || [[ "$origpre" = [-+]* ]] } ; then local prevpre="$PREFIX" previpre="$IPREFIX" diff --git a/Completion/Base/_combination b/Completion/Base/_combination index 97da22a5f..ffda5cae9 100644 --- a/Completion/Base/_combination +++ b/Completion/Base/_combination @@ -78,7 +78,7 @@ key="${1%:*}" num="${${1##*:}:-1}" shift -if _style -a "$tag" "$style" tmp; then +if zstyle -a ":completion${curcontext}:$tag" "$style" tmp; then eval "tmp=( \"\${(@M)tmp:#\${(j($sep))~pats}}\" )" if (( keys[(in:num:)$key] != 1 )); then eval "tmp=( \${tmp#\${(j(${sep}))~\${(@)\${(@)keys[2,(rn:num:)\$key]}/*/*}}$sep} )" diff --git a/Completion/Base/_describe b/Completion/Base/_describe index 7be7ea29f..1db7e6fb6 100644 --- a/Completion/Base/_describe +++ b/Completion/Base/_describe @@ -16,7 +16,7 @@ fi _tags "$_type" || return 1 -_style "$_type" verbose && _showd=yes +zstyle -t ":completion${curcontext}:$_type" verbose && _showd=yes _description "$_type" _expl "$1" shift @@ -27,7 +27,8 @@ else compdescribe -i "$@" fi -[[ "$_type" = options ]] && _style options prefix-hidden && _hide=yes +[[ "$_type" = options ]] && + zstyle -t ":completion${curcontext}:options" prefix-hidden && _hide=yes while compdescribe -g _args _tmpd _tmpmd _tmps _tmpms; do diff --git a/Completion/Base/_first b/Completion/Base/_first index 6740c00c5..f81ab465e 100644 --- a/Completion/Base/_first +++ b/Completion/Base/_first @@ -50,7 +50,7 @@ # # We first search in the last ten words, then in the last # # twenty words, and so on... # while [[ i -le max ]]; do -# if _style history-words sort; then +# if zstyle -t ":completion${curcontext}:history-words" sort; then # _description history-words expl "history ($n)" # else # _description -V history-words expl "history ($n)" diff --git a/Completion/Base/_jobs b/Completion/Base/_jobs index addc88607..ff9fa5a62 100644 --- a/Completion/Base/_jobs +++ b/Completion/Base/_jobs @@ -4,9 +4,10 @@ local expl disp jobs job jids pfx='%' desc _tags jobs || return 1 -_style jobs prefix-needed && [[ "$PREFIX" != %* ]] && return 1 -_style jobs prefix-hidden && pfx='' -_style jobs verbose && desc=yes +zstyle -t ":completion${curcontext}:jobs" prefix-needed && + [[ "$PREFIX" != %* ]] && return 1 +zstyle -t ":completion${curcontext}:jobs" prefix-hidden && pfx='' +zstyle -t ":completion${curcontext}:jobs" verbose && desc=yes if [[ "$1" = -r ]]; then jids=( "${(@k)jobstates[(R)running*]}" ) @@ -30,7 +31,7 @@ if [[ -n "$desc" ]]; then done fi -if _style jobs strings; then +if zstyle -t ":completion${curcontext}:jobs" strings; then local texts i text str tmp # Find shortest unambiguous strings. diff --git a/Completion/Base/_regex_arguments b/Completion/Base/_regex_arguments index 918eafc5c..653aeedbe 100644 --- a/Completion/Base/_regex_arguments +++ b/Completion/Base/_regex_arguments @@ -330,7 +330,7 @@ _regex_arguments () { local i state next local cache_dir - _style -s regex cache-path cache_dir + zstyle -s ":completion${curcontext}:regex" cache-path cache_dir [[ -z "$cache_dir" ]] && cache_dir="$HOME/.zsh/regex_arguments" local cache_file="$cache_dir/$1" local cache_test diff --git a/Completion/Base/_subscript b/Completion/Base/_subscript index 21e62e8aa..fdda19301 100644 --- a/Completion/Base/_subscript +++ b/Completion/Base/_subscript @@ -21,14 +21,14 @@ elif [[ ${(Pt)${compstate[parameter]}} = array* ]]; then while _tags; do if _requested -V indexes expl 'array index'; then ind=( {1..${#${(P)${compstate[parameter]}}}} ) - if _style indexes verbose; then + if zstyle -t ":completion${curcontext}:indexes" verbose; then list=() for i in "$ind[@]"; do [[ "$i" = ${PREFIX}*${SUFFIX} ]] && list=( "$list[@]" "${i}:$(print -D ${(P)${compstate[parameter]}[$i]})" ) done - compdisplay list ' -- ' "$list[@]" + zformat -a list ' -- ' "$list[@]" disp=( -d list) else disp=() diff --git a/Completion/Base/_tilde b/Completion/Base/_tilde index 4aceca6ce..bba928f50 100644 --- a/Completion/Base/_tilde +++ b/Completion/Base/_tilde @@ -22,9 +22,9 @@ while _tags; do compadd "$suf[@]" "$expl[@]" "$@" - "${(@k)nameddirs}" if _requested -V directory-stack expl 'directory stack' && - { ! _style directory-stack prefix-needed || + { ! zstyle -t ":completion${curcontext}:directory-stack" prefix-needed || [[ "$PREFIX" = [-+]* ]] }; then - if _style directory-stack verbose; then + if zstyle -t ":completion${curcontext}:directory-stack" verbose; then integer i lines=("${PWD}" "${dirstack[@]}") |