From 3f52f95978987d51b4f8f548c7cccc5cae7d64f5 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Thu, 28 Aug 2003 10:36:00 +0000 Subject: merge completion function changes back from 4.1 --- Completion/Unix/Command/.distfiles | 2 +- Completion/Unix/Command/_ecasound | 4 +- Completion/Unix/Command/_screen | 81 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 Completion/Unix/Command/_screen (limited to 'Completion/Unix/Command') diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles index a14dd6ffd..fa947708f 100644 --- a/Completion/Unix/Command/.distfiles +++ b/Completion/Unix/Command/.distfiles @@ -20,5 +20,5 @@ _chkconfig _cdcd _irssi _sccs _texinfo _ant _global _figlet _ifconfig _last _larch _lsof _mt _xmlsoft _elinks _tidy _python _antiword _renice _sablotron _cdrecord _aap _du -_rar _vorbis _subversion +_rar _vorbis _subversion _screen ' diff --git a/Completion/Unix/Command/_ecasound b/Completion/Unix/Command/_ecasound index cb6b724a0..67b9c363a 100644 --- a/Completion/Unix/Command/_ecasound +++ b/Completion/Unix/Command/_ecasound @@ -12,10 +12,10 @@ _arguments \ '(-)--version[show version information]' \ '-n\:-[set the name of chainsetup]:chainsetup name' \ '-s\:-[create a new chainsetup from file]:chainsetup file:_files' \ - '-sr\:-[set internal sampling rate]:Internal sampling rate:(8000 11025 22050 44100 48000)' \ + '-sr\:-[set internal sampling rate]:internal sampling rate:(8000 11025 22050 44100 48000)' \ '*-a\:-[select active signal chains]:chain name' \ '-b\:-[set the size of buffer in samples]:buffer size:->b' \ - '-m\:-[force use of specified mix mode]:Mix mode:((auto\:Automatic simple\:Only\ one\ input/cain/output normal\:Normal\ single-threaded\ mode))' \ + '-m\:-[force use of specified mix mode]:mix mode:((auto\:Automatic simple\:Only\ one\ input/cain/output normal\:Normal\ single-threaded\ mode))' \ '-r[use realtime scheduling policy (SCHED_FIFO)]' \ '-r\:-[use realtime scheduling policy (SCHED_FIFO)]:sched_priority' \ '-x[truncate outputs]' \ diff --git a/Completion/Unix/Command/_screen b/Completion/Unix/Command/_screen new file mode 100644 index 000000000..89ddc9a96 --- /dev/null +++ b/Completion/Unix/Command/_screen @@ -0,0 +1,81 @@ +#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 .sockname instead of ..]: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 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 -- cgit 1.4.1