summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2018-07-19 17:26:11 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2018-07-19 17:26:11 +0900
commit218a7e324dc52e5b9f2e724c1463fb0643a6036f (patch)
treeeb940be468f2ac54ae24ce6c56c6756b1ede6b6e /Completion
parent71bc1296edfc548751354f4bf5832aba3fcd0b95 (diff)
downloadzsh-218a7e324dc52e5b9f2e724c1463fb0643a6036f.tar.gz
zsh-218a7e324dc52e5b9f2e724c1463fb0643a6036f.tar.xz
zsh-218a7e324dc52e5b9f2e724c1463fb0643a6036f.zip
43183: fix '_ttys -o' and use it in _gdb/_pgrep
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_gdb4
-rw-r--r--Completion/Unix/Command/_pgrep2
-rw-r--r--Completion/Unix/Type/_ttys2
3 files changed, 4 insertions, 4 deletions
diff --git a/Completion/Unix/Command/_gdb b/Completion/Unix/Command/_gdb
index 510e6f1fa..18f797633 100644
--- a/Completion/Unix/Command/_gdb
+++ b/Completion/Unix/Command/_gdb
@@ -5,12 +5,12 @@ 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:_ttys' && return 0
+		  '*=TTY: :_ttys -o' && return 0
 
 if compset -P '-(cd|directory)='; then
   _files -/
 elif compset -P '-tty='; then
-  _wanted devices expl 'terminal device' _ttys
+  _ttys -o
 elif compset -P '-(exec|se)='; then
   _description files expl executable
   _files "$expl[@]" -g '*(-*)'
diff --git a/Completion/Unix/Command/_pgrep b/Completion/Unix/Command/_pgrep
index b6020e5a9..86aef3462 100644
--- a/Completion/Unix/Command/_pgrep
+++ b/Completion/Unix/Command/_pgrep
@@ -40,7 +40,7 @@ arguments=(
   # _signals is OK here — we do it differently below
   '(ss)--signal=[specify signal to send to process]: :_signals -s'
   '-T+[match only on specified routing table]:routing table'
-  '(-t --terminal)'{-t+,--terminal=}'[match only on specified controlling terminals]:terminal device:_sequence _ttys -d'
+  '(-t --terminal)'{-t+,--terminal=}'[match only on specified controlling terminals]: :_sequence _ttys -do'
   '(-U --uid)'{-U+,--uid=}'[match only on specified real user IDs]: :_sequence _users'
   '(-u --euid)'{-u+,--euid=}'[match only on specified effective user IDs]: :_sequence _users'
   '(-v --inverse)'{-v,--inverse}'[negate matching]'
diff --git a/Completion/Unix/Type/_ttys b/Completion/Unix/Type/_ttys
index 7408395c8..3c40466cb 100644
--- a/Completion/Unix/Type/_ttys
+++ b/Completion/Unix/Type/_ttys
@@ -12,7 +12,7 @@ local stripdev optdev open
 zparseopts -D -K -E d=stripdev D=optdev o=open
 
 if [[ -n $open ]]; then
-  ttys=( ${(u)${(f)"$(_call_program open-ttys ps -ao tty=)"}%% *} )
+  ttys=( ${(u)${${(f)"$(_call_program open-ttys ps -Ao tty=)"}:#\?*}%% *} )
   _description open-ttys expl 'open tty'
 else
   ttys=( /dev/tty?*(N) /dev/pts/^ptmx(N) )