zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: screen session completion
@ 2004-11-21  4:27 Doug Kearns
  2004-11-23 23:24 ` Doug Kearns
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Kearns @ 2004-11-21  4:27 UTC (permalink / raw)
  To: zsh-workers

Screen session completion seems to be broken; here's a quick fix.

Regards,
Doug

Index: Completion/Unix/Command/_screen
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_screen,v
retrieving revision 1.6
diff -u -r1.6 _screen
--- Completion/Unix/Command/_screen	7 Aug 2004 19:01:24 -0000	1.6
+++ Completion/Unix/Command/_screen	20 Nov 2004 21:05:10 -0000
@@ -76,18 +76,18 @@
   case $state in
     attached-sessions)
       sessions=(
-	${${${${(f)"$(_call_program screen-sessions $words[1] \
-            -ls)"}[2,-3]##[[:blank:]]}:#*Detached*}%[[:blank:]]*}
+	${${${${${(f)"$(_call_program screen-sessions $words[1] \
+            -ls)"}[2,-4]}##[[:blank:]]}:#*(Detached|Dead)*}%[[:blank:]]*}
       )
     ;;
     detached-sessions)
       sessions=(
-	${${${${(f)"$(_call_program screen-sessions $words[1] \
-            -ls)"}[2,-3]##[[:blank:]]}:#*Attached*}%[[:blank:]]*}
+	${${${${${(f)"$(_call_program screen-sessions $words[1] \
+            -ls)"}[2,-4]}##[[:blank:]]}:#*(Attached|Dead)*}%[[: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" \


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: screen session completion
  2004-11-21  4:27 PATCH: screen session completion Doug Kearns
@ 2004-11-23 23:24 ` Doug Kearns
  2004-11-27  7:15   ` Doug Kearns
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Kearns @ 2004-11-23 23:24 UTC (permalink / raw)
  To: zsh-workers

On Sun, Nov 21, 2004 at 03:27:47PM +1100, Doug Kearns wrote:
> Screen session completion seems to be broken; here's a quick fix.

A little too quick; I'll come up with a proper fix shortly...

Regards,
Doug


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: screen session completion
  2004-11-23 23:24 ` Doug Kearns
@ 2004-11-27  7:15   ` Doug Kearns
  0 siblings, 0 replies; 3+ messages in thread
From: Doug Kearns @ 2004-11-27  7:15 UTC (permalink / raw)
  To: zsh-workers

On Wed, Nov 24, 2004 at 10:24:52AM +1100, Doug Kearns wrote:
> On Sun, Nov 21, 2004 at 03:27:47PM +1100, Doug Kearns wrote:
> > Screen session completion seems to be broken; here's a quick fix.
> 
> A little too quick; I'll come up with a proper fix shortly...

This will pick up multiuser sessions as well.

Regards,
Doug

Index: Completion/Unix/Command/_screen
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_screen,v
retrieving revision 1.6
diff -u -r1.6 _screen
--- Completion/Unix/Command/_screen	7 Aug 2004 19:01:24 -0000	1.6
+++ Completion/Unix/Command/_screen	26 Nov 2004 17:01:51 -0000
@@ -76,18 +76,18 @@
   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" \


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-27  7:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-21  4:27 PATCH: screen session completion Doug Kearns
2004-11-23 23:24 ` Doug Kearns
2004-11-27  7:15   ` Doug Kearns

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).