Package: zsh
Version: 4.3.2-25
Severity: wishlist
Tags: patch
Currently -r and -R completions list only detached sessions, and -x completion
lists only attached sessions. In fact, when any of these arguments used
together with -D or -d command (in the format either "-D -r" or "-Dr"), they
should complete any available sessions, no matter are they detached or
attached.
This means that any combination of "-[Dd][Rrx]" or "-[Dd] -[Rrx]" should
complete into the list of any available sessions.
I include the trivial patch to handle the "-[Dd][Rrx]" part (the file to change
is /usr/share/zsh/4.3.2/functions/Completion/Unix/_screen); if anyone can
provide the similar completion for "-[Dd] -[Rrx]", it would be good.
--- _screen.old 2007-05-14 22:25:16.000000000 +0400
+++ _screen.new 2007-05-14 22:51:36.000000000 +0400
@@ -75,7 +75,11 @@
'-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 @@
'(-)-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:([EMAIL PROTECTED])' \
'*::arguments: _normal'
@@ -101,6 +107,11 @@
-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
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (450, 'unstable')
Architecture: i386 (i586)
Kernel: Linux 2.6.18-4-486
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages zsh depends on:
ii debconf [debconf-2.0] 1.5.13 Debian configuration management sy
ii libc6 2.3.6.ds1-13 GNU C Library: Shared libraries
ii libncurses5 5.5-5 Shared libraries for terminal hand
Versions of packages zsh recommends:
ii libcap1 1:1.10-14 support for getting/setting POSIX.
ii libpcre3 6.7-1 Perl 5 Compatible Regular Expressi
-- debconf information:
zsh/rcmove:
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]