about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDoug Kearns <dkearns@users.sourceforge.net>2004-11-27 15:20:28 +0000
committerDoug Kearns <dkearns@users.sourceforge.net>2004-11-27 15:20:28 +0000
commitfdae219903892548d9a8facfdd20d989bc24870e (patch)
treedabe1d3739bf984989c86d57d1497b28951b1cca
parentdaade2bfaea50ccdac5897f6003ddbd8ffb6dd61 (diff)
downloadzsh-fdae219903892548d9a8facfdd20d989bc24870e.tar.gz
zsh-fdae219903892548d9a8facfdd20d989bc24870e.tar.xz
zsh-fdae219903892548d9a8facfdd20d989bc24870e.zip
offer multiuser screen sessions for attaching/detaching
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_screen10
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  <djkea2@gus.gscit.monash.edu.au>
+
+	* 20584: Completion/Unix/Command/_screen: offer multiuser screen
+	sessions for attaching/detaching
+
 2004-11-24  Clint Adams  <clint@zsh.org>
 
 	* 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" \