mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-23 04:51:12 +02:00
81 lines
3.8 KiB
Text
81 lines
3.8 KiB
Text
#compdef screen
|
|
#Generated by Felix Rosencrantz
|
|
|
|
local context state line scr_cmds
|
|
typeset -A opt_args
|
|
scr_cmds=(
|
|
acladd aclchg acldel aclgrp aclumask
|
|
activity addacl allpartial at attrcolor
|
|
autodetach autonuke backtick bce bell_msg
|
|
bind bindkey break breaktype bufferfile
|
|
c1 caption charset chdir clear
|
|
colon command compacthist console copy
|
|
copy_reg crlf debug defautonuke defbce
|
|
defbreaktype defc1 defcharset defencoding defescape
|
|
defflow defgr defhstatus defkanji deflog
|
|
deflogin defmode defmonitor defobuflimit defscrollback
|
|
defshell defsilence defslowpaste defutf8 defwrap
|
|
defwritelock defzombie detach digraph dinfo
|
|
displays dumptermcap echo encoding escape
|
|
eval exec fit flow focus
|
|
gr hardcopy hardcopy_append hardcopydir hardstatus
|
|
height help history hstatus ignorecase
|
|
info ins_reg kill lastmsg license
|
|
lockscreen log logfile login logtstamp
|
|
mapdefault mapnotnext maptimeout markkeys maxwin
|
|
meta monitor msgminwait msgwait multiuser
|
|
nethack next nonblock number obuflimit
|
|
only other partial password paste
|
|
pastefont pow_break pow_detach pow_detach_msg prev
|
|
printcmd process quit readbuf readreg
|
|
redisplay register remove removebuf reset
|
|
resize screen scrollback select sessionname
|
|
setenv setsid shell shelltitle silence
|
|
silencewait sleep slowpaste sorendition source
|
|
split startup_message stuff su term
|
|
termcap termcapinfo terminfo time title
|
|
unsetenv utf8 vbell vbell_msg vbellwait
|
|
verbose version wall width windowlist
|
|
windows wrap writebuf writelock xoff
|
|
xon zombie
|
|
)
|
|
|
|
_arguments \
|
|
"-a[force all capabilities into each window's termcap]" \
|
|
'-A[adapt all windows to the new display width & height]' \
|
|
"-c[read configuration file instead of '.screenrc']:config file:_files -/" \
|
|
'-d[detach the elsewhere running screen (with -r: reattach here)]:session name:->sessionname' \
|
|
'-dmS[start as daemon, screen session in detached mode]' \
|
|
'-D[detach and logout remote (with -r: reattach here)]' \
|
|
'-e[change command characters]:command characters:' \
|
|
'-f-[set flow control]:flow control:((n\:flow\ control\ off a\:Flow\ control\ auto \:Flow\ control\ on))' \
|
|
'-h[set the size of the scrollback history buffer]:buffer size:' \
|
|
'-i[interrupt output sooner when flow control is on]' \
|
|
'(-l)-ln[login mode off (do not update /var/run/utmp)]' \
|
|
'(-ln)-l[login mode on (update /var/run/utmp)]' \
|
|
'(-)'{-ls,-list}'[list sessions/socket directory]' \
|
|
"-L[terminal's last character can be safely updated]" \
|
|
'-m[ignore $STY variable, do create a new screen session]' \
|
|
'-O[choose optimal output rather than exact vt100 emulation]' \
|
|
'-p[preselect the named window]:window number or name:(( \=\:windowlist -\:blank\ window \:window\ number))' \
|
|
'-q[quiet startup. exits with non-zero return code if unsuccessful]' \
|
|
'-r[reattach to a detached screen process]:session name:->sessionname' \
|
|
'-R[reattach if possible, otherwise start a new session]' \
|
|
'-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:" \
|
|
'-T[use term as $TERM for windows, rather than "screen"]:terminal type:_terminals' \
|
|
'-U[tell screen to use UTF-8 encoding]' \
|
|
'(-)-v[print screen version]' \
|
|
'(-)-wipe[do nothing, clean up SockDir]' \
|
|
'-x[attach to a not detached screen. (Multi display mode).]' \
|
|
'-X[Execute <cmd> as a screen command in the specified session.]:screencmd:(${scr_cmds[@]})'
|
|
|
|
case $state in
|
|
sessionname)
|
|
# Complete session names
|
|
local screendir
|
|
screendir=( ${${${(M)${(f)"$(_call_program screen-session $words[1] -ls)"}:#*Socket*}%.}##* } )
|
|
_wanted screen-session expl 'screen process' _path_files -W screendir
|
|
;;
|
|
esac
|