Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: screen session completion



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" \



Messages sorted by: Reverse Date, Date, Thread, Author