Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Let _screen complete sessions for -dRR and -DRR
- X-seq: zsh-workers 28097
- From: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- To: Zsh Workers <zsh-workers@xxxxxxx>
- Subject: [PATCH] Let _screen complete sessions for -dRR and -DRR
- Date: Fri, 23 Jul 2010 01:40:02 -0400
- Cc: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
GNU Screen allows two 'R's after a -d (detach) or -D (detach and logout)
as '-dRR' or '-DRR' to mean reattach and create if necessary, picking
the first if multiple options apply. Current completion only allowed
one 'R' (which doesn't have the 'and pick the first'). This patch
combines the various ':->any-session' handlers into a single expansion,
adding -dRR and -DRR in the process.
---
Completion/Unix/Command/_screen | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/Completion/Unix/Command/_screen b/Completion/Unix/Command/_screen
index 67c453a..448b82c 100644
--- a/Completion/Unix/Command/_screen
+++ b/Completion/Unix/Command/_screen
@@ -75,11 +75,7 @@ _arguments -C \
'-p[preselect the named window]:window number or name:((\=\:windowlist -\:blank\ window \:window\ number))' \
'-q[quiet startup, exit with non-zero return code if unsuccessful]' \
'-r[reattach to a detached screen process]: :->detached-sessions' \
- '-Dr: :->any-sessions' \
- '-dr: :->any-sessions' \
'-R[reattach if possible, otherwise start a new session]: :->detached-sessions' \
- '-DR: :->any-sessions' \
- '-dR: :->any-sessions' \
'-s[shell to execute rather than $SHELL]:shell name: _command_names -e' \
'-S[name this session <pid>.sockname instead of <pid>.<tty>.<host>]:session name' \
"-t[set title (window's name)]:title" \
@@ -88,8 +84,7 @@ _arguments -C \
'(-)-v[print screen version]' \
'(-)-wipe[do nothing, clean up SockDir]' \
'-x[attach to a not detached screen (multi display mode)]: :->attached-sessions' \
- '-Dx: :->any-sessions' \
- '-dx: :->any-sessions' \
+ '-'{d,D}{r,R,RR,x}': :->any-sessions' \
'-X[execute command as a screen command in the specified session]:screencmd:(${scr_cmds[@]})' \
'*::arguments: _normal'
--
1.7.1
Messages sorted by:
Reverse Date,
Date,
Thread,
Author