From 3c3ffa433dca8c6c396d1cca734bc349a91b9797 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Fri, 4 Feb 2000 12:14:06 +0000 Subject: zsh-workers/9562 --- Completion/Base/_arg_compile | 2 +- Completion/Base/_arguments | 6 +----- Completion/Base/_command_names | 2 +- Completion/Builtins/_hash | 2 +- Completion/User/_gdb | 8 ++++---- Completion/User/_ssh | 4 ++-- Completion/User/_strip | 2 +- Completion/X/_xrdb | 2 +- Completion/X/_xutils | 2 +- 9 files changed, 13 insertions(+), 17 deletions(-) (limited to 'Completion') diff --git a/Completion/Base/_arg_compile b/Completion/Base/_arg_compile index 44db86abe..e37c869ee 100644 --- a/Completion/Base/_arg_compile +++ b/Completion/Base/_arg_compile @@ -71,7 +71,7 @@ # option -d follow close means "debug level" \ # option -k means "function names" action '->pair' \ # option -m means "minimum execution count" \ -# argument means executable action '_files -g \*\(\*\)' \ +# argument means executable action '_files -g \*\(-\*\)' \ # argument means "profile file" action '_files -g gmon.\*' \ # help '*=name*' means "function name" action '->funcs' \ # help '*=dirs*' means "directory" action _dir_list diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments index fb28438e2..19288b7ca 100644 --- a/Completion/Base/_arguments +++ b/Completion/Base/_arguments @@ -134,11 +134,7 @@ if (( long )); then tmp=("${(@)tmp:#*\=*}") tmpo=("${(@)${(@)tmpo%%\=*}//[^a-z0-9-]}") - if [[ "$descr" = ::* ]]; then - cache=( "$cache[@]" "${(@)^tmpo}=${descr[2,-1]}" ) - else - cache=( "$cache[@]" "${(@)^tmpo}=${descr}" ) - fi + cache=( "$cache[@]" "${(@)^tmpo}=${descr}" ) fi # Everything else is just added as a option without arguments. diff --git a/Completion/Base/_command_names b/Completion/Base/_command_names index 141e30614..755e5ef15 100644 --- a/Completion/Base/_command_names +++ b/Completion/Base/_command_names @@ -8,7 +8,7 @@ local args defs defs=( 'commands:external command:compadd - ${(@k)commands}' - 'executables:executable file or directory:_path_files -/g \*\(\*\)' + 'executables:executable file or directory:_path_files -/g \*\(-\*\)' ) if [[ "$1" = -e ]]; then diff --git a/Completion/Builtins/_hash b/Completion/Builtins/_hash index 05728fb7b..c8a51a38a 100644 --- a/Completion/Builtins/_hash +++ b/Completion/Builtins/_hash @@ -11,7 +11,7 @@ if [[ "$words[2]" = -*d* ]]; then fi elif compset -P 1 '*='; then _wanted -C value values expl 'executable file' && - _files "$expl[@]" -g '*(*)' + _files "$expl[@]" -g '*(-*)' else _wanted -C name commands expl command && compadd "$expl[@]" -q -S '=' - "${(@k)commands}" diff --git a/Completion/User/_gdb b/Completion/User/_gdb index a095370ab..283aff631 100644 --- a/Completion/User/_gdb +++ b/Completion/User/_gdb @@ -4,7 +4,7 @@ local cur="$words[CURRENT]" prev w list ret=1 expl [[ "$PREFIX" = --* ]] && _arguments -- '*=(CORE|SYM)FILE:core file:_files' \ - '*=EXECFILE:executable:_files \*\(\*\)' \ + '*=EXECFILE:executable:_files \*\(-\*\)' \ '*=TTY:terminal device:compadd /dev/tty\*' && return 0 if compset -P '-(cd|directory)='; then @@ -13,7 +13,7 @@ elif compset -P '-tty='; then _wanted devices expl 'terminal device' && compadd "$expl[@]" - /dev/tty* elif compset -P '-(exec|se)='; then _description files expl executable - _files "$expl[@]" -g '*(*)' + _files "$expl[@]" -g '*(-*)' elif compset -P '-(symbols|core|command)='; then _files elif [[ "$PREFIX" = -* ]]; then @@ -30,7 +30,7 @@ else (-d) _files -/ && return 0 ;; (-[csx]) _files && return 0 ;; (-e) _description files expl executable - _files "$expl[@]" -g '*(*)' && return 0 ;; + _files "$expl[@]" -g '*(-*)' && return 0 ;; (-b) _wanted -V values expl 'baud rate' && compadd "$expl[@]" 0 50 75 110 134 150 200 300 600 1200 1800 \ 2400 4800 9600 19200 38400 57600 115200 \ @@ -47,6 +47,6 @@ else _alternative 'files:: _files' "processes:: _pids -m ${w[1]:t}" else _description files expl executable - _files "$expl[@]" -g '*(*)' + _files "$expl[@]" -g '*(-*)' fi fi diff --git a/Completion/User/_ssh b/Completion/User/_ssh index 9b07a62cf..aa4ffb2f6 100644 --- a/Completion/User/_ssh +++ b/Completion/User/_ssh @@ -91,7 +91,7 @@ _ssh () { ;; *(#i)xauthlocation*) _description files expl 'xauth program' - _files "$expl[@]" -g '*(*)' && ret=0 + _files "$expl[@]" -g '*(-*)' && ret=0 ;; esac else @@ -155,7 +155,7 @@ _ssh () { '-c[select encryption cipher]:encryption cipher:(idea des 3des blowfish arcfour tss none)' \ '-P[specify port on remote host]:port number on remote host:' \ '-i[select identity file]:SSH identity file:_files' \ - '-S[specify path to ssh]:path to ssh:_files -g \*\(\*\)' \ + '-S[specify path to ssh]:path to ssh:_files -g \*\(-\*\)' \ '-o[give SSH options]:options:->options' \ '-p[preserve modification times]' \ '-r[recursively copy directories]' \ diff --git a/Completion/User/_strip b/Completion/User/_strip index 378eafe99..d7d8aabdd 100644 --- a/Completion/User/_strip +++ b/Completion/User/_strip @@ -3,4 +3,4 @@ local expl _description files expl executable -_files "$expl[@]" -g '*(*)' +_files "$expl[@]" -g '*(-*)' diff --git a/Completion/X/_xrdb b/Completion/X/_xrdb index 585e5909f..83ccb9955 100644 --- a/Completion/X/_xrdb +++ b/Completion/X/_xrdb @@ -3,7 +3,7 @@ _arguments \ -{help,all,global,screen,screens,n,quiet,nocpp,symbols,query,load,merge,remove,retain} \ '-display:display:_x_display' \ - '-cpp:preprocessor program:_files -g \*\(\*\)' \ + '-cpp:preprocessor program:_files -g \*\(-\*\)' \ '-edit:file to insert:_files' \ '-backup:suffix for backup: ' \ '*:defaults file:_files' diff --git a/Completion/X/_xutils b/Completion/X/_xutils index 216203622..a2ce9f654 100644 --- a/Completion/X/_xutils +++ b/Completion/X/_xutils @@ -138,7 +138,7 @@ xrdb) '(-global -all -screens)-screen' \ '(-global -all -screen)-screens' \ '-n[only display on stdout]' \ - '(-nocpp)-cpp:preprocessor program:_files -g \*\(\*\)' \ + '(-nocpp)-cpp:preprocessor program:_files -g \*\(-\*\)' \ '(-cpp)-nocpp' \ '(-load -override -merge -remove)-query' \ '(-query -override -merge -remove)-load' \ -- cgit 1.4.1