1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-19 05:24:23 +01:00

offer multiuser screen sessions for attaching/detaching

This commit is contained in:
Doug Kearns 2004-11-27 15:20:28 +00:00
parent daade2bfae
commit fdae219903
2 changed files with 10 additions and 5 deletions

@ -1,3 +1,8 @@
2004-11-27 Doug Kearns <djkea2@gus.gscit.monash.edu.au>
* 20584: Completion/Unix/Command/_screen: offer multiuser screen
sessions for attaching/detaching
2004-11-24 Clint Adams <clint@zsh.org> 2004-11-24 Clint Adams <clint@zsh.org>
* 20578: Functions/Prompts/prompt_elite2_setup: * 20578: Functions/Prompts/prompt_elite2_setup:

@ -76,18 +76,18 @@ if [[ -n $state ]]; then
case $state in case $state in
attached-sessions) attached-sessions)
sessions=( sessions=(
${${${${(f)"$(_call_program screen-sessions $words[1] \ ${${${(M)${(f)"$(_call_program screen-sessions $words[1] \
-ls)"}[2,-3]##[[:blank:]]}:#*Detached*}%[[:blank:]]*} -ls)"}:#*[Aa]ttached*}##[[:blank:]]}%%[[:blank:]]*}
) )
;; ;;
detached-sessions) detached-sessions)
sessions=( sessions=(
${${${${(f)"$(_call_program screen-sessions $words[1] \ ${${${(M)${(f)"$(_call_program screen-sessions $words[1] \
-ls)"}[2,-3]##[[:blank:]]}:#*Attached*}%[[:blank:]]*} -ls)"}:#*[Dd]etached*}##[[:blank:]]}%%[[:blank:]]*}
) )
;; ;;
esac esac
# check if initial PID is necessary to make sessions unambiguous # check if initial PID is necessary to make sessions unambiguous
if [[ ${#${(u)sessions#*.}} -lt $#sessions ]]; then if [[ ${#${(u)sessions#*.}} -lt $#sessions ]]; then
_wanted screen-sessions expl "${state%-*} screen process" \ _wanted screen-sessions expl "${state%-*} screen process" \