Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: screen session completion
- X-seq: zsh-workers 20584
- From: Doug Kearns <dougkearns@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: screen session completion
- Date: Sat, 27 Nov 2004 18:15:03 +1100
- In-reply-to: <20041123232452.GG3928@xxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20041121042747.GC3922@xxxxxxxxxxxxxxxxxxxxx> <20041123232452.GG3928@xxxxxxxxxxxxxxxxxxxxx>
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" \
Messages sorted by:
Reverse Date,
Date,
Thread,
Author