diff options
Diffstat (limited to 'Completion/Zsh/Context')
-rw-r--r-- | Completion/Zsh/Context/_brace_parameter | 5 | ||||
-rw-r--r-- | Completion/Zsh/Context/_condition | 3 | ||||
-rw-r--r-- | Completion/Zsh/Context/_subscript | 6 | ||||
-rw-r--r-- | Completion/Zsh/Context/_value | 1 |
4 files changed, 10 insertions, 5 deletions
diff --git a/Completion/Zsh/Context/_brace_parameter b/Completion/Zsh/Context/_brace_parameter index e77d4c58b..f22db8895 100644 --- a/Completion/Zsh/Context/_brace_parameter +++ b/Completion/Zsh/Context/_brace_parameter @@ -141,7 +141,7 @@ if [[ $PREFIX = *'${('[^\)]# ]]; then flags+=( "#:evaluate as numeric expression" "@:double-quoted splitting of scalars" - "A:create array parameter" + "A:assign as an array parameter" "a:sort in array index order (with O to reverse)" "b:backslash quote pattern characters only" "c:count characters in an array (with \${(c)#...})" @@ -179,7 +179,7 @@ if [[ $PREFIX = *'${('[^\)]# ]]; then "S:search substrings in #, %, / expressions" "I:search <argument>th match in #, %, / expressions" "B:include index of beginning of match in #, %, / expressions" - "E:include index of end of match in #, %, / expressions" + "E:include index of one past end of match in #, %, / expressions" "M:include matched portion in #, %, / expressions" "N:include length of match in #, % expressions" "R:include rest (unmatched portion) in #, %, / expressions" @@ -197,6 +197,7 @@ elif compset -P '*:'; then '\:=:unconditionally assign value to parameter' '?:print error if parameter is set and non-null' '#:filter value matching pattern' + '/:replace whole word matching pattern' '|:set difference' '*:set intersection' '^:zip arrays' diff --git a/Completion/Zsh/Context/_condition b/Completion/Zsh/Context/_condition index 6f5e601f0..0285911ac 100644 --- a/Completion/Zsh/Context/_condition +++ b/Completion/Zsh/Context/_condition @@ -8,6 +8,8 @@ elif [[ "$prev" = -([a-hkprsuwxLOGSN]|[no]t|ef) ]]; then _tags -C "$prev" files && _files elif [[ "$prev" = -t ]]; then _file_descriptors +elif [[ "$prev" = -v ]]; then + _parameters -r "\= \t\n\[\-" else if [[ "$PREFIX" = -* ]] || ! zstyle -T ":completion:${curcontext}:options" prefix-needed; then @@ -30,6 +32,7 @@ else -s:non-empty\ file -t:terminal\ file\ descriptor -u:setuid\ bit + -v:set\ variable -w:writable\ file -x:executable\ file -z:empty\ string diff --git a/Completion/Zsh/Context/_subscript b/Completion/Zsh/Context/_subscript index 80642d8db..0c9a89ad5 100644 --- a/Completion/Zsh/Context/_subscript +++ b/Completion/Zsh/Context/_subscript @@ -62,6 +62,7 @@ elif compset -P '\('; then 'e[interpret * or @ as a single key]' );; (|scalar*)) flags=( + 'f[make subscripting work on lines of scalar]' 'w[make subscripting work on words of scalar]' 's[specify word separator]' 'p[recognise escape sequences in subsequent s flag]' @@ -99,10 +100,9 @@ elif [[ ${(Pt)${compstate[parameter]}} = array* ]]; then list=() for i in "$ind[@]"; do if [[ "$i" = ${PREFIX}*${SUFFIX} ]]; then - list=( "$list[@]" - "${i}:$(print -D ${(P)${compstate[parameter]}[$i]})" ) + list+=( "${i}:$(print -D -- ${(P)${compstate[parameter]}[$i]})" ) else - list=( "$list[@]" '' ) + list+=( '' ) fi done zstyle -s ":completion:${curcontext}:indexes" list-separator sep || sep=-- diff --git a/Completion/Zsh/Context/_value b/Completion/Zsh/Context/_value index 47fbc1749..22372ab36 100644 --- a/Completion/Zsh/Context/_value +++ b/Completion/Zsh/Context/_value @@ -24,6 +24,7 @@ else if [[ "$compstate[parameter]" != *-* && "$compstate[context]" = *value && "${(Pt)${compstate[parameter]}}" = assoc* ]]; then + local expl if (( CURRENT & 1 )); then _wanted association-keys expl 'association key' \ compadd -k "$compstate[parameter]" |