diff options
Diffstat (limited to 'Completion/Unix/Type')
-rw-r--r-- | Completion/Unix/Type/_baudrates | 7 | ||||
-rw-r--r-- | Completion/Unix/Type/_canonical_paths | 7 | ||||
-rw-r--r-- | Completion/Unix/Type/_files | 2 | ||||
-rw-r--r-- | Completion/Unix/Type/_list_files | 2 | ||||
-rw-r--r-- | Completion/Unix/Type/_path_files | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/Completion/Unix/Type/_baudrates b/Completion/Unix/Type/_baudrates index add359d13..6e9ba4d97 100644 --- a/Completion/Unix/Type/_baudrates +++ b/Completion/Unix/Type/_baudrates @@ -72,7 +72,6 @@ if (( ${+opts[-f]} )); then done fi -# -1V removes dupes (which there shouldn't be) and otherwise leaves the -# order in the $rates array intact. -_description -1V baud-rates expl 'baud rate' -compadd "${(@)argv/#-J/-V}" "$expl[@]" -- "${rates[@]}" +# -1 removes dupes (which there shouldn't be) +_description -1 -o numeric baud-rates expl 'baud rate' +compadd "${argv[@]}" "$expl[@]" -- "${rates[@]}" diff --git a/Completion/Unix/Type/_canonical_paths b/Completion/Unix/Type/_canonical_paths index 6eab7b677..cddc3b405 100644 --- a/Completion/Unix/Type/_canonical_paths +++ b/Completion/Unix/Type/_canonical_paths @@ -5,13 +5,14 @@ # (relative path when an absolute path is given, and vice versa; when ..'s are # present in the word to be completed, and some paths got from symlinks). -# Usage: _canonical_paths [-A var] [-N] [-MJV12nfX] tag desc [paths...] +# Usage: _canonical_paths [-A var] [-N] [-MJV12onfX] tag desc [paths...] # -A, if specified, takes the paths from the array variable specified. Paths # can also be specified on the command line as shown above. -N, if specified, # prevents canonicalizing the paths given before using them for completion, in # case they are already so. `tag' and `desc' arguments are well, obvious :) In -# addition, the options -M, -J, -V, -1, -2, -n, -F, -X are passed to compadd. +# addition, the options -M, -J, -V, -1, -2, -o, -n, -F, -x, -X are passed to +# compadd. _canonical_paths_add_paths () { # origpref = original prefix @@ -59,7 +60,7 @@ _canonical_paths() { local __index typeset -a __gopts __opts - zparseopts -D -a __gopts M: J: V: 1 2 n F: X: A:=__opts N=__opts + zparseopts -D -a __gopts M+: J+: V+: o+: 1 2 n F: x+: X+: A:=__opts N=__opts : ${1:=canonical-paths} ${2:=path} diff --git a/Completion/Unix/Type/_files b/Completion/Unix/Type/_files index 467ed747c..6adaa8154 100644 --- a/Completion/Unix/Type/_files +++ b/Completion/Unix/Type/_files @@ -27,7 +27,7 @@ local opts tmp glob pat pats expl tag i def descr end ign tried local type sdef ignvars ignvar prepath oprefix rfiles rfile zparseopts -a opts \ - '/=tmp' 'f=tmp' 'g+:-=tmp' q n 1 2 P: S: r: R: W: X+: M+: F: J+: V+: + '/=tmp' 'f=tmp' 'g+:-=tmp' q n 1 2 P: S: r: R: W: x+: X+: M+: F: J+: V+: o+: type="${(@j::M)${(@)tmp#-}#?}" if (( $tmp[(I)-g*] )); then diff --git a/Completion/Unix/Type/_list_files b/Completion/Unix/Type/_list_files index 6c52bc1f4..0ea02a55a 100644 --- a/Completion/Unix/Type/_list_files +++ b/Completion/Unix/Type/_list_files @@ -64,6 +64,6 @@ for f in ${(PQ)1}; do ${(r:8:)stat[gid]} ${(l:8:)stat[size]} $stat[mtime] $f") done -(( ${#listfiles} )) && listopts=(-d listfiles -l -o) +(( ${#listfiles} )) && listopts=(-d listfiles -l -o match) return 0 diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files index 1021c34e6..19ae59629 100644 --- a/Completion/Unix/Type/_path_files +++ b/Completion/Unix/Type/_path_files @@ -59,7 +59,7 @@ exppaths=() zparseopts -a mopts \ 'P:=pfx' 'S:=pfxsfx' 'q=pfxsfx' 'r:=pfxsfx' 'R:=pfxsfx' \ 'W:=prepaths' 'F:=ignore' 'M+:=matcher' \ - J+: V+: X+: 1 2 n 'f=tmp1' '/=tmp1' 'g+:-=tmp1' + J+: V+: x+: X+: 1 2 o+: n 'f=tmp1' '/=tmp1' 'g+:-=tmp1' sopt="-${(@j::M)${(@)tmp1#-}#?}" (( $tmp1[(I)-[/g]*] )) && haspats=yes @@ -168,7 +168,7 @@ if zstyle -s ":completion:${curcontext}:" file-sort tmp1; then if [[ "$sort" = on ]]; then sort= else - mopts=( "${(@)mopts/#-J/-V}" ) + mopts=( -o nosort "${mopts[@]}" ) tmp2=() for tmp1 in "$pats[@]"; do |