From 52cace80567dc53fa8d32f3664b524b5e8ec905b Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Tue, 2 Jun 2015 00:52:11 +0200 Subject: 35356: factor out completion of tty devices --- Completion/Unix/Command/_gdb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Completion/Unix/Command/_gdb') 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 -- cgit v1.2.3 From 54c2c442eeee46b28d5596e7e83812df01d1f13f Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Mon, 15 Jun 2015 05:43:46 +0200 Subject: _gdb: Allow 'core' to occur anywhere in a coredump filename --- ChangeLog | 5 +++++ Completion/Unix/Command/_gdb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_gdb') diff --git a/ChangeLog b/ChangeLog index 17fd01237..cb3b5e78d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-06-17 Mikael Magnusson + + * 35477: Completion/Unix/Command/_gdb: _gdb: Allow 'core' to + occur anywhere in a coredump filename + 2015-06-14 Barton E. Schaefer * 35469: Functions/Zle/smart-insert-last-word: test UNDO_CHANGE_NO diff --git a/Completion/Unix/Command/_gdb b/Completion/Unix/Command/_gdb index f387c878a..e9c333925 100644 --- a/Completion/Unix/Command/_gdb +++ b/Completion/Unix/Command/_gdb @@ -49,7 +49,7 @@ else done if [[ $#w -gt 1 ]]; then - _alternative "files:: _files -g '*core(-.)'" "processes:: _pids -m ${w[1]:t}" + _alternative "files:: _files -g '*core*(-.)'" "processes:: _pids -m ${w[1]:t}" else _description files expl executable _files "$expl[@]" -g '*(-*)' -- cgit v1.2.3