diff options
Diffstat (limited to 'Completion/Unix')
-rw-r--r-- | Completion/Unix/Command/_ant | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_cpio | 8 | ||||
-rw-r--r-- | Completion/Unix/Command/_cvs | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_dbus | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_git | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_graphicsmagick | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_growisofs | 4 | ||||
-rw-r--r-- | Completion/Unix/Command/_gs | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_gsettings | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_head | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_imagemagick | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_java | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_lp | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_lzop | 3 | ||||
-rw-r--r-- | Completion/Unix/Command/_mount | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_perl | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_php | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_rlogin | 4 | ||||
-rw-r--r-- | Completion/Unix/Command/_ssh | 10 | ||||
-rw-r--r-- | Completion/Unix/Command/_tail | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_w3m | 4 |
21 files changed, 32 insertions, 31 deletions
diff --git a/Completion/Unix/Command/_ant b/Completion/Unix/Command/_ant index 195a54374..19c252a4e 100644 --- a/Completion/Unix/Command/_ant +++ b/Completion/Unix/Command/_ant @@ -83,7 +83,7 @@ case $state in "classpath:$state:_path_files -r': ' -/" && ret=0 ;; property) - if compset -P '*='; then + if compset -P 1 '*='; then _default && ret=0 else _message -e properties 'property name' diff --git a/Completion/Unix/Command/_cpio b/Completion/Unix/Command/_cpio index 6b07a214a..4027cc0ca 100644 --- a/Completion/Unix/Command/_cpio +++ b/Completion/Unix/Command/_cpio @@ -106,10 +106,10 @@ fi _arguments -C -s "$args[@]" && ret=0 if [[ $state = afile ]]; then - if compset -P '*:'; then - # TODO: doesn't need to be rsh. - _wanted files expl 'remote files' \ - compadd $(rsh ${words[CURRENT]%:*} echo ${words[CURRENT]#*:}\*) && ret=0 + if [[ $ig != gnu ]]; then + _files && ret=0 + elif compset -P 1 '*:'; then + _remote_files -- ssh && ret=0 elif compset -P '*@'; then _wanted hosts expl 'remote host name' _hosts && ret=0 else diff --git a/Completion/Unix/Command/_cvs b/Completion/Unix/Command/_cvs index 18383c33e..0552d2175 100644 --- a/Completion/Unix/Command/_cvs +++ b/Completion/Unix/Command/_cvs @@ -595,7 +595,7 @@ _cvs_tempdir() { (( $+functions[_cvs_user_variable] )) || _cvs_user_variable() { - if compset -P '*='; then + if compset -P 1 '*='; then _default else _message -e variables "variable" diff --git a/Completion/Unix/Command/_dbus b/Completion/Unix/Command/_dbus index b24a6e9a8..fd035743f 100644 --- a/Completion/Unix/Command/_dbus +++ b/Completion/Unix/Command/_dbus @@ -32,7 +32,7 @@ esac case $state in addresses) compset -P '*;' - if compset -P '*='; then + if compset -P 1 '*='; then _files && ret=0 else _message -e addresses address diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 80b2c55af..437036a9b 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1335,7 +1335,7 @@ _git-push () { '--follow-tags[also push missing annotated tags reachable from the pushed refs]' \ '(--receive-pack --exec)'{--receive-pack=-,--exec=-}'[path to git-receive-pack on remote]:remote git-receive-pack:_files' \ '(--force-with-lease --no-force-with-lease)*--force-with-lease=-[allow refs that are not ancestors to be updated if current ref matches expected value]::ref and expectation:->lease' \ - '(--force-with-lease --no-force-with-lease)--no-force-with-lease=-[cancel all previous force-with-lease specifications]' \ + '(--force-with-lease --no-force-with-lease)--no-force-with-lease[cancel all previous force-with-lease specifications]' \ '(-f --force)'{-f,--force}'[allow refs that are not ancestors to be updated]' \ '(:)--repo=[default repository to use]:repository:__git_any_repositories' \ '(-u --set-upstream)'{-u,--set-upstream}'[add upstream reference for each branch that is up to date or pushed]' \ diff --git a/Completion/Unix/Command/_graphicsmagick b/Completion/Unix/Command/_graphicsmagick index 150f5ae61..cc541d891 100644 --- a/Completion/Unix/Command/_graphicsmagick +++ b/Completion/Unix/Command/_graphicsmagick @@ -360,7 +360,7 @@ case "$words[2]" in '*:picture file:_imagemagick' && return if [[ "$state" = profile ]]; then - if compset -P '*:'; then + if compset -P 1 '*:'; then _files else _wanted prefixes expl 'profile type' compadd icc: iptc: diff --git a/Completion/Unix/Command/_growisofs b/Completion/Unix/Command/_growisofs index 36b45d5ba..f67961f24 100644 --- a/Completion/Unix/Command/_growisofs +++ b/Completion/Unix/Command/_growisofs @@ -116,7 +116,7 @@ _mkisofs_sparc_boot_images () { _mkisofs_pathspec () { local sep if (( $words[(I)-graft-points] )); then - if ! compset -P '*[^\\]\='; then + if ! compset -P 1 '*[^\\]\='; then sep='-qS=' fi fi @@ -335,7 +335,7 @@ else case "$state" in (devimg) - if compset -P \*=; then + if compset -P 1 '*='; then _files else _files -g "*(%,@)" diff --git a/Completion/Unix/Command/_gs b/Completion/Unix/Command/_gs index 22f3c789b..98ba14912 100644 --- a/Completion/Unix/Command/_gs +++ b/Completion/Unix/Command/_gs @@ -32,7 +32,7 @@ else fi ;; sname) - if compset -P '*='; then + if compset -P 1 '*='; then case "$IPREFIX" in *DEVICE\=) _wanted devices expl 'ghostscript device' \ diff --git a/Completion/Unix/Command/_gsettings b/Completion/Unix/Command/_gsettings index f47bbc6b1..72f015729 100644 --- a/Completion/Unix/Command/_gsettings +++ b/Completion/Unix/Command/_gsettings @@ -31,7 +31,7 @@ case $state in state='' ;; schemata) - if compset -P '*:'; then + if compset -P 1 '*:'; then _directories && ret=0 else _wanted schemata expl 'schema' compadd -M 'r:|.=* r:|=*' \ diff --git a/Completion/Unix/Command/_head b/Completion/Unix/Command/_head index 4f956acdc..c76cce30e 100644 --- a/Completion/Unix/Command/_head +++ b/Completion/Unix/Command/_head @@ -32,7 +32,7 @@ case $state in sign='sign:sign:((-\:"print all but the last specified bytes/lines"' sign+=' +\:"print the first specified bytes/lines (default)"))' digit='digits:digit:(0 1 2 3 4 5 6 7 8 9)' - if compset -P '*[0-9]'; then + if compset -P '[0-9]##'; then _alternative $mlt $digit && ret=0 elif [[ -z $PREFIX ]]; then _alternative $sign $digit && ret=0 diff --git a/Completion/Unix/Command/_imagemagick b/Completion/Unix/Command/_imagemagick index 4a9b62a9b..c2c9dc478 100644 --- a/Completion/Unix/Command/_imagemagick +++ b/Completion/Unix/Command/_imagemagick @@ -364,7 +364,7 @@ case "$service" in '*:picture file:_imagemagick' && return if [[ "$state" = profile ]]; then - if compset -P '*:'; then + if compset -P 1 '*:'; then _files else _wanted prefixes expl 'profile type' compadd icc: iptc: diff --git a/Completion/Unix/Command/_java b/Completion/Unix/Command/_java index 2aef15a25..7d5bd42e5 100644 --- a/Completion/Unix/Command/_java +++ b/Completion/Unix/Command/_java @@ -578,7 +578,7 @@ encoding) ;; property) - if compset -P '*='; then + if compset -P 1 '*='; then _default && return else _message -e property-names 'property name' diff --git a/Completion/Unix/Command/_lp b/Completion/Unix/Command/_lp index 8da84a180..63fbab78a 100644 --- a/Completion/Unix/Command/_lp +++ b/Completion/Unix/Command/_lp @@ -44,7 +44,7 @@ _lp_job_options() # The program specified by the style list-printer-options should list jobs in # the same style as lpoptions -l. - if compset -P '*='; then + if compset -P 1 '*='; then # List values for the option case ${IPREFIX%=} in (media) diff --git a/Completion/Unix/Command/_lzop b/Completion/Unix/Command/_lzop index 6f09cf47e..7661d117c 100644 --- a/Completion/Unix/Command/_lzop +++ b/Completion/Unix/Command/_lzop @@ -69,8 +69,9 @@ case "$state" in "F $sep Append a \`*' for executable files" "G $sep Inhibit display of group information" "Q $sep Enclose file names in double quotes" ) + # The "Z" on the next line is sentinel to prevent the character class from being empty. disp=( ${disp[@]:#[Z$PREFIX]*} ) - compset -P '[FGQ]*' + compset -P '[FGQ]#' compadd -d disp - ${disp[@]%% *} && ret=0 ;; esac diff --git a/Completion/Unix/Command/_mount b/Completion/Unix/Command/_mount index a43085ac1..e2c3cfdad 100644 --- a/Completion/Unix/Command/_mount +++ b/Completion/Unix/Command/_mount @@ -856,7 +856,7 @@ fsopt) devordir) local dev_tmp mp_tmp mline - if compset -P '*:'; then + if compset -P 1 '*:'; then _wanted exports expl 'exported path' compadd \ ${${(f)"$(path+=( {/usr,}/sbin(N) ) _call_program exports \ showmount -e ${IPREFIX%:} 2>/dev/null)"}[2,-1]%% *} && ret=0 diff --git a/Completion/Unix/Command/_perl b/Completion/Unix/Command/_perl index 52559b800..0914264fe 100644 --- a/Completion/Unix/Command/_perl +++ b/Completion/Unix/Command/_perl @@ -56,7 +56,7 @@ _perl_normal() { _perl_m_opt () { compset -P '-' - if compset -P '*='; then + if compset -P 1 '*='; then _message -e module-arguments 'module arguments, comma separated' else _perl_modules -S= -q diff --git a/Completion/Unix/Command/_php b/Completion/Unix/Command/_php index 0e840032f..d03f3395e 100644 --- a/Completion/Unix/Command/_php +++ b/Completion/Unix/Command/_php @@ -50,7 +50,7 @@ case $state in local -a directives suf local code='foreach (ini_get_all() as $k => $v) { echo "$k\n"; }' directives=( $(_call_program directives $words[1] -r ${(q)code} 2>/dev/null) ) - if compset -P '*='; then + if compset -P 1 '*='; then _default && return 0 else compset -S '=*' || suf=( -qS '=' ) diff --git a/Completion/Unix/Command/_rlogin b/Completion/Unix/Command/_rlogin index 8f74939fd..685e4e50b 100644 --- a/Completion/Unix/Command/_rlogin +++ b/Completion/Unix/Command/_rlogin @@ -38,9 +38,9 @@ _rlogin () { '*:files:->files' && ret=0 if [[ -n "$state" ]]; then - if compset -P '*:'; then + if compset -P 1 '*:'; then _remote_files -- rsh && ret=0 - elif compset -P '*@'; then + elif compset -P 1 '*@'; then _wanted hosts expl host _rlogin_hosts -S: && ret=0 else _alternative \ diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh index 5ee4fd2ad..84328199a 100644 --- a/Completion/Unix/Command/_ssh +++ b/Completion/Unix/Command/_ssh @@ -200,7 +200,7 @@ _ssh () { case "$lstate" in option) - if compset -P '*='; then + if compset -P 1 '*='; then case "${IPREFIX#-o}" in (#i)(ciphers|macs|kexalgorithms|hostkeyalgorithms|pubkeyacceptedkeytypes|hostbasedkeytypes)=) if ! compset -P +; then @@ -628,9 +628,9 @@ _ssh () { fi ;; file) - if compset -P '[^./][^/]#:'; then + if compset -P 1 '[^./][^/]#:'; then _remote_files -- ssh ${(kv)~opt_args[(I)-[FP1246]]/-P/-p} && ret=0 - elif compset -P '*@'; then + elif compset -P 1 '*@'; then suf=( -S '' ) compset -S ':*' || suf=( -r: -S: ) _wanted hosts expl 'remote host name' _ssh_hosts $suf && ret=0 @@ -642,9 +642,9 @@ _ssh () { fi ;; rfile) - if compset -P '*:'; then + if compset -P 1 '*:'; then _remote_files -- ssh && ret=0 - elif compset -P '*@'; then + elif compset -P 1 '*@'; then _wanted hosts expl host _ssh_hosts -r: -S: && ret=0 else _alternative \ diff --git a/Completion/Unix/Command/_tail b/Completion/Unix/Command/_tail index fbe30f13a..89e9cfbae 100644 --- a/Completion/Unix/Command/_tail +++ b/Completion/Unix/Command/_tail @@ -56,7 +56,7 @@ case $state in sign='signs:sign:((+\:"start at the specified byte/line"' sign+=' -\:"output the last specified bytes/lines (default)"))' digit='digits:digit:(0 1 2 3 4 5 6 7 8 9)' - if compset -P '*[0-9]'; then + if compset -P '[0-9]##'; then _alternative $mlt $digit && ret=0 elif [[ -z $PREFIX ]]; then _alternative $sign $digit && ret=0 diff --git a/Completion/Unix/Command/_w3m b/Completion/Unix/Command/_w3m index 9569368a5..6e83a6781 100644 --- a/Completion/Unix/Command/_w3m +++ b/Completion/Unix/Command/_w3m @@ -90,7 +90,7 @@ case "$state" in option) local -a options options=( ${${(M)${(f)"$(_call_program options $words[1] -show-option 2>/dev/null)"}:# -o *}/(#b) -o (*)=[^ ]#[[:blank:]]##(*)/$match[1]:${match[2]:l}} ) - if compset -P '*='; then + if compset -P 1 '*='; then _message -e values 'value' else compset -S '=*' || suf=( -S '=' ) @@ -98,7 +98,7 @@ case "$state" in fi ;; pauth) - if compset -P '*:'; then + if compset -P 1 '*:'; then _message -e passwords 'password' else compset -S ':*' || suf=( -S ':' ) |