diff options
author | Oliver Kiddle <opk@zsh.org> | 2015-06-02 00:52:11 +0200 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2015-06-02 00:52:11 +0200 |
commit | 52cace80567dc53fa8d32f3664b524b5e8ec905b (patch) | |
tree | f377e740b33e20fb22f559543db19b387b254339 /Completion/Unix/Command/_gdb | |
parent | 72ecc2ef36b203175aad3f6dd4b76e474a82d8b6 (diff) | |
download | zsh-52cace80567dc53fa8d32f3664b524b5e8ec905b.tar.gz zsh-52cace80567dc53fa8d32f3664b524b5e8ec905b.tar.xz zsh-52cace80567dc53fa8d32f3664b524b5e8ec905b.zip |
35356: factor out completion of tty devices
Diffstat (limited to 'Completion/Unix/Command/_gdb')
-rw-r--r-- | Completion/Unix/Command/_gdb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_gdb b/Completion/Unix/Command/_gdb index 48c9d654f..f387c878a 100644 --- a/Completion/Unix/Command/_gdb +++ b/Completion/Unix/Command/_gdb @@ -5,17 +5,19 @@ local cur="$words[CURRENT]" prev w list ret=1 expl [[ "$PREFIX" = --* ]] && _arguments -- '*=(CORE|SYM)FILE:core file:_files' \ '*=EXECFILE:executable:_files -g \*\(-\*\)' \ - '*=TTY:terminal device:compadd /dev/tty\*' && return 0 + '*=TTY:terminal device:_ttys' && return 0 if compset -P '-(cd|directory)='; then _files -/ elif compset -P '-tty='; then - _wanted devices expl 'terminal device' compadd - /dev/tty* + _wanted devices expl 'terminal device' _ttys elif compset -P '-(exec|se)='; then _description files expl executable _files "$expl[@]" -g '*(-*)' elif compset -P '-(symbols|core|command)='; then _files +elif compset -P '--pid='; then + _pids elif [[ "$PREFIX" = -* ]]; then _tags options while _tags; do |