From: Felix Rosencrantz <f_rosencrantz@yahoo.com>
To: zsh-workers <zsh-workers@sunsite.auc.dk>
Subject: Re: screen -x <complete>
Date: Fri, 9 Nov 2001 10:29:54 -0800 (PST) [thread overview]
Message-ID: <20011109182954.59790.qmail@web10402.mail.yahoo.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 945 bytes --]
I use GNU screen regularly and wrote a simple completion function for it.
However, it only handled the -x flag. Since, there was some interest on this
list, I decide to see if I could easily generate a function via the XML code.
I think I was able to get a good first pass completion function via the XML
code, which I'm happy about. It did require some hand editing, but not too
much.
The details about my xml completion generation can be found at:
http://www.geocities.com/f_rosencrantz/screen_generation.htm
Though if you just want the function I've attached it. It's still could use
some work, but it's a reasonable start. I think it would be interesting to
add completions for the commands that can be handed to the "screen -X"
command. That would need to use the <subcommands> element in screen.xml.
-FR.
__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com
[-- Attachment #2: screen.txt --]
[-- Type: text/plain, Size: 3622 bytes --]
#compdef screen
#Generated by args.xsl For details see:
# http://www.geocities.com/f_rosencrantz/clearcase_generation.htm
local context state line
typeset -A opt_args
_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'.:_files -/" \
'-d:Detach the elsewhere running screen (with -r: reattach here).:->sessionname' \
'-dmS:Start as daemon: Screen session in detached mode.' \
'-D:Detach and logout remote (with -r: reattach here).' \
'-e:Change command characters.' \
'-f-:Flow control on, -fn = off, -fa = auto.:((n\:Flow\ conrol\ off a\:Flow\ conrol\ auto))' \
'-h:Set the size of the scrollback history buffer.' \
'-i:Interrupt output sooner when flow control is on.' \
'-l:Login mode on (update /var/run/utmp), -ln = off.' \
'-list:Do nothing, just list our SockDir.' \
'-ls:Do nothing, just list our SockDir.' \
"-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 if it exists.' \
'-q:Quiet startup. Exits with non-zero return code if unsuccessful.' \
'-r:Reattach to a detached screen process.:->sessionname' \
'-R:Reattach if possible, otherwise start a new session.' \
'-s:Shell to execute rather than $SHELL.' \
'-S:Name this session <pid>.sockname instead of <pid>.<tty>.<host>.' \
"-t:Set title. (window's name)." \
'-T:Use term as $TERM for windows, rather than "screen".' \
'-U:Tell screen to use UTF-8 encoding.' \
'-v:Print "Screen version 3.09.11beta (FAU) 11-Oct-01".' \
'-wipe:Do nothing, just clean up SockDir.' \
'-x:Attach to a not detached screen. (Multi display mode).' \
'-X:Execute <cmd> as a screen command in the specified session.:( acladd addacl aclchg acldel aclgrp aclumask activity allpartial at attrcolor autodetach autonuke bce bell_msg bind bindkey break breaktype bufferfile c1 caption charset chdir clear colon command compacthist console copy copy_reg crlf debug defc1 defautonuke defbce defbreaktype defcharset defescape defflow defgr defhstatus defkanji deflogin defmode defmonitor defobuflimit defscrollback defshell defsilence defslowpaste defutf8 defwrap defwritelock defzombie detach dinfo displays digraph dumptermcap echo escape exec fit flow focus gr hardcopy hardcopy_append hardcopydir hardstatus height help history hstatus info ins_reg kill lastmsg license lockscreen log logfile login logtstamp mapdefault mapnotnext maptimeout markkeys 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 shell shelltitle silence silencewait sleep slowpaste sorendition split startup_message stuff su term termcap terminfo termcapinfo time title unsetenv utf8 vbell vbell_msg vbellwait verbose version wall width windows wrap writebuf writelock xoff xon zombie defzombie)'
case $state in
sessionname)
# Complete folder names.
local screendir
screendir=(`screen -ls | grep Socket | tail -1 | sed -e 's/\.$//' | awk '{print $NF;}'`)
_wanted files expl 'screen process' _path_files -W screendir
;;
esac
next reply other threads:[~2001-11-09 18:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-09 18:29 Felix Rosencrantz [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-10-22 16:54 Michal Maruška
2001-10-22 17:40 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011109182954.59790.qmail@web10402.mail.yahoo.com \
--to=f_rosencrantz@yahoo.com \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).