zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] Let _screen complete sessions for -dRR and -DRR
@ 2010-07-23  5:40 Benjamin R. Haskell
  0 siblings, 0 replies; only message in thread
From: Benjamin R. Haskell @ 2010-07-23  5:40 UTC (permalink / raw)
  To: Zsh Workers; +Cc: Benjamin R. Haskell

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-23  5:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-23  5:40 [PATCH] Let _screen complete sessions for -dRR and -DRR Benjamin R. Haskell

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).