diff options
Diffstat (limited to 'Completion/User/_gdb')
-rw-r--r-- | Completion/User/_gdb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Completion/User/_gdb b/Completion/User/_gdb index 22242caff..dab301b39 100644 --- a/Completion/User/_gdb +++ b/Completion/User/_gdb @@ -21,20 +21,22 @@ 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 + compadd "$expl[@]" - -help -h -s -e -c -x -d -nx -n -quiet -q \ + -batch -fullname -f -b else prev="$words[CURRENT-1]" case "$prev" in - (-d) _files -/ && return 0 ;; + (-d) _files -/ && return 0 ;; (-[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 ;; + (-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 ;; esac + w=( "${(@)words[2,-1]}" ) while [[ "$w[1]" = -* ]]; do [[ "$w[1]" = -[decsxb] ]] && shift 1 w @@ -42,10 +44,8 @@ else done if [[ $#w -gt 1 ]]; then - _files && ret=0 - _description expl 'process ID' - list=("${(@M)${(f)$(ps ${=compconfig[ps_listargs]:-$=compconfig[ps_args]} 2>/dev/null)}[2,-1]:#[ ]#${PREFIX}[0-9]#${SUFFIX}[ ]*${w[1]:t}*}") - compadd "$expl[@]" -ld list - ${${${(M)${(f)"$(ps $=compconfig[ps_args] 2>/dev/null)"}:#*${w[1]:t}*}## #}%% *} && ret=0 + _files && ret=0 + _pids -m "${w[1]:t}" && ret=0 return ret else |