about summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2007-05-14 19:49:29 +0000
committerClint Adams <clint@users.sourceforge.net>2007-05-14 19:49:29 +0000
commit6463aa5e53666754443b2dfda5f90bfe58085f1b (patch)
tree1a4b1b38d86dd939f0f9e80e75c64710d8e72086 /Completion/Unix/Command
parenta11fbaf68c2bf81424c1ca8381e2043b5b56711b (diff)
downloadzsh-6463aa5e53666754443b2dfda5f90bfe58085f1b.tar.gz
zsh-6463aa5e53666754443b2dfda5f90bfe58085f1b.tar.xz
zsh-6463aa5e53666754443b2dfda5f90bfe58085f1b.zip
23439: complete sessions for -dr, -dR, -Dr, -DR, -dx, and -Dx.
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_screen11
1 files changed, 11 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_screen b/Completion/Unix/Command/_screen
index 43747fcf8..be0e3558d 100644
--- a/Completion/Unix/Command/_screen
+++ b/Completion/Unix/Command/_screen
@@ -75,7 +75,11 @@ _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" \
@@ -84,6 +88,8 @@ _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' \
   '-X[execute command as a screen command in the specified session]:screencmd:(${scr_cmds[@]})' \
   '*::arguments: _normal'
 
@@ -101,6 +107,11 @@ if [[ -n $state ]]; then
             -ls)"}:#*[Dd]etached*}##[[:blank:]]}%%[[:blank:]]*}
       )
     ;;
+    any-sessions)
+      sessions=(
+        ${${${(M)${(f)"$(_call_program screen-sessions $words[1] \
+	    -ls)"}:#*tached*}##[[:blank:]]}%%[[:blank:]]*}
+      )
   esac
 
   # check if initial PID is necessary to make sessions unambiguous