diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-15 12:01:46 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-15 12:01:46 +0000 |
commit | 35b2633ad941966f5fca07b625a594a5b68c0fdb (patch) | |
tree | b54740d014e594ba5d81931cdcdb3387bcf9dfca /Completion/User/_gdb | |
parent | bb98460a01ce1f6c1e71f7e401f782c81b71486b (diff) | |
download | zsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.tar.gz zsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.tar.xz zsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.zip |
manual/8639
Diffstat (limited to 'Completion/User/_gdb')
-rw-r--r-- | Completion/User/_gdb | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/Completion/User/_gdb b/Completion/User/_gdb index dab301b39..d037b83d9 100644 --- a/Completion/User/_gdb +++ b/Completion/User/_gdb @@ -10,19 +10,19 @@ local cur="$words[CURRENT]" prev w list ret=1 expl if compset -P '-(cd|directory)='; then _files -/ elif compset -P '-tty='; then - _description expl 'terminal device' - compadd "$expl[@]" - /dev/tty* + _wanted devices expl 'terminal device' && compadd "$expl[@]" - /dev/tty* elif compset -P '-(exec|se)='; then _description expl executable _files "$expl[@]" -g '*(*)' elif compset -P '-(symbols|core|command)='; then _files elif [[ "$PREFIX" = -* ]]; then - _description expl option - compadd "$expl[@]" -QS '' - -symbols\= -exec\= -se\= -core\= -command\= \ - -directory\= -cd\= -tty\= - compadd "$expl[@]" - -help -h -s -e -c -x -d -nx -n -quiet -q \ - -batch -fullname -f -b + if _wanted options expl option; then + compadd "$expl[@]" -QS '' - -symbols\= -exec\= -se\= -core\= -command\= \ + -directory\= -cd\= -tty\= + compadd "$expl[@]" - -help -h -s -e -c -x -d -nx -n -quiet -q \ + -batch -fullname -f -b + fi else prev="$words[CURRENT-1]" @@ -31,10 +31,10 @@ else (-[csx]) _files && return 0 ;; (-e) _description expl executable _files "$expl[@]" -g '*(*)' && return 0 ;; - (-b) _description -V expl 'baud rate' - compadd "$expl[@]" 0 50 75 110 134 150 200 300 600 1200 1800 \ - 2400 4800 9600 19200 38400 57600 115200 \ - 230400 && return 0 ;; + (-b) _wanted values expl -V expl 'baud rate' && + compadd "$expl[@]" 0 50 75 110 134 150 200 300 600 1200 1800 \ + 2400 4800 9600 19200 38400 57600 115200 \ + 230400 && return 0 ;; esac w=( "${(@)words[2,-1]}" ) @@ -44,10 +44,7 @@ else done if [[ $#w -gt 1 ]]; then - _files && ret=0 - _pids -m "${w[1]:t}" && ret=0 - - return ret + _alternative 'files:: _files' "processes:: _pids -m ${w[1]:t}" else _description expl executable _files "$expl[@]" -g '*(*)' |