From fdae219903892548d9a8facfdd20d989bc24870e Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 27 Nov 2004 15:20:28 +0000 Subject: [PATCH] offer multiuser screen sessions for attaching/detaching --- ChangeLog | 5 +++++ Completion/Unix/Command/_screen | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad8510c51..a5003eb7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-11-27 Doug Kearns + + * 20584: Completion/Unix/Command/_screen: offer multiuser screen + sessions for attaching/detaching + 2004-11-24 Clint Adams * 20578: Functions/Prompts/prompt_elite2_setup: diff --git a/Completion/Unix/Command/_screen b/Completion/Unix/Command/_screen index a744fa72b..bb2153160 100644 --- a/Completion/Unix/Command/_screen +++ b/Completion/Unix/Command/_screen @@ -76,18 +76,18 @@ if [[ -n $state ]]; then case $state in attached-sessions) sessions=( - ${${${${(f)"$(_call_program screen-sessions $words[1] \ - -ls)"}[2,-3]##[[:blank:]]}:#*Detached*}%[[:blank:]]*} + ${${${(M)${(f)"$(_call_program screen-sessions $words[1] \ + -ls)"}:#*[Aa]ttached*}##[[:blank:]]}%%[[:blank:]]*} ) ;; detached-sessions) sessions=( - ${${${${(f)"$(_call_program screen-sessions $words[1] \ - -ls)"}[2,-3]##[[:blank:]]}:#*Attached*}%[[:blank:]]*} + ${${${(M)${(f)"$(_call_program screen-sessions $words[1] \ + -ls)"}:#*[Dd]etached*}##[[:blank:]]}%%[[:blank:]]*} ) ;; esac - + # check if initial PID is necessary to make sessions unambiguous if [[ ${#${(u)sessions#*.}} -lt $#sessions ]]; then _wanted screen-sessions expl "${state%-*} screen process" \