diff options
author | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-12-03 02:31:49 +0000 |
---|---|---|
committer | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-12-03 02:31:49 +0000 |
commit | b32f902ba598c851196b037178233477c2411876 (patch) | |
tree | b7cbfbe7ef82be75804f4a1c1800506208b7d489 /Completion/Unix/Command | |
parent | 79a0a88e660f0b4027a75d374efb7ffba3011adc (diff) | |
download | zsh-b32f902ba598c851196b037178233477c2411876.tar.gz zsh-b32f902ba598c851196b037178233477c2411876.tar.xz zsh-b32f902ba598c851196b037178233477c2411876.zip |
Bring various .distfiles up to date and merge any extra completions onto 4.2 branch.
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r-- | Completion/Unix/Command/.distfiles | 245 | ||||
-rw-r--r-- | Completion/Unix/Command/_arp | 14 | ||||
-rw-r--r-- | Completion/Unix/Command/_cdrecord | 4 | ||||
-rw-r--r-- | Completion/Unix/Command/_cp | 32 | ||||
-rw-r--r-- | Completion/Unix/Command/_cplay | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_diffstat | 19 | ||||
-rw-r--r-- | Completion/Unix/Command/_flasher | 29 | ||||
-rw-r--r-- | Completion/Unix/Command/_gcc | 335 | ||||
-rw-r--r-- | Completion/Unix/Command/_getconf | 7 | ||||
-rw-r--r-- | Completion/Unix/Command/_gnutls | 126 | ||||
-rw-r--r-- | Completion/Unix/Command/_joe | 39 | ||||
-rw-r--r-- | Completion/Unix/Command/_mh | 6 | ||||
-rw-r--r-- | Completion/Unix/Command/_ping | 63 | ||||
-rw-r--r-- | Completion/Unix/Command/_quilt | 36 | ||||
-rw-r--r-- | Completion/Unix/Command/_sed | 27 | ||||
-rw-r--r-- | Completion/Unix/Command/_su | 69 | ||||
-rw-r--r-- | Completion/Unix/Command/_totd | 13 |
17 files changed, 1019 insertions, 47 deletions
diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles index 9be819220..9f1a737ca 100644 --- a/Completion/Unix/Command/.distfiles +++ b/Completion/Unix/Command/.distfiles @@ -1,33 +1,218 @@ DISTFILES_SRC=' .distfiles -_a2ps _bittorrent _darcs -_dvi _gzip _man _rcs _w3m -_apachectl _enscript _iconv _mh _rlogin _webbrowser -_cdrecord _fakeroot _imagemagick _mount _sh _wget -_arp _fetchmail _init_d _mutt _slrn _whereis -_bison _find _ispell _mysql_utils _socket _whois -_bzip2 _finger _java _ncftp _ssh _xargs -_chown _flex _joe _nslookup _strip _yodl -_compress _gcc _killall _pack _stty _yp -_configure _gdb _look _patch _su _zcat -_cpio _getconf _lp _pbm _sudo _zdump -_cvs _gnu_generic _ls _perl _tar _zip -_dd _gprof _lynx _perldoc _telnet _pine -_dict _grep _lzop _prcs _tiff _elm -_diff _gs _make _psutils _tin _mail -_last _loadkeys _ruby _sysctl _links _samba -_user_admin _rsync _arping _spamassassin _mtools _ifconfig -_fsh _chkconfig _cdcd _irssi _mysqldiff _sccs -_aap _ant _antiword _apm _attr -_baz _bogofilter -_cal _chmod _du _ecasound _elinks _figlet -_getent _global _gpg _gphoto2 _less _lsof -_mencal _mpc _mt _mtr -_netcat _nice _nmap -_perforce _php _postfix _printenv _python -_raggle _rar _renice -_sablotron _screen _sed _subversion -_texinfo _tla _tidy -_unace _uniq _vorbis _vux _wiggle _xmlsoft -_bzr _cplay _date _git _quilt +_a2ps +_aap +_ant +_antiword +_apachectl +_apm +_arp +_arping +_attr +_baz +_bison +_bittorrent +_bogofilter +_bzip2 +_bzr +_cal +_ccal +_cdcd +_cdrdao +_cdrecord +_chkconfig +_chmod +_chown +_comm +_compress +_configure +_cowsay +_cp +_cpio +_cplay +_cssh +_cut +_cvs +_darcs +_date +_dd +_dhclient +_dict +_diff +_diffstat +_dmidecode +_du +_dvi +_ecasound +_elinks +_elm +_enscript +_env +_fakeroot +_fetchmail +_figlet +_find +_finger +_flasher +_flex +_fortune +_fsh +_fuser +_gcc +_gdb +_genisoimage +_getconf +_getent +_getmail +_git +_global +_gnu_generic +_gnutls +_gpg +_gphoto2 +_gprof +_grep +_groff +_growisofs +_gs +_guilt +_gzip +_iconv +_ifconfig +_imagemagick +_init_d +_ip +_irssi +_ispell +_java +_joe +_killall +_knock +_kvno +_last +_ldd +_less +_links +_loadkeys +_locate +_look +_lp +_ls +_lsof +_lynx +_lzop +_mail +_make +_man +_md5sum +_mencal +_mercurial +_metaflac +_mh +_mkdir +_module +_monotone +_mount +_mpc +_mt +_mtools +_mtr +_mutt +_mysql_utils +_mysqldiff +_ncftp +_netcat +_nice +_nmap +_nslookup +_pack +_patch +_pax +_pbm +_perforce +_perl +_perldoc +_php +_pine +_ping +_pkg-config +_pon +_postfix +_prcs +_printenv +_psutils +_pump +_python +_qemu +_quilt +_raggle +_rake +_ranlib +_rar +_rcs +_renice +_ri +_rlogin +_rrdtool +_rsync +_rubber +_ruby +_sablotron +_samba +_sccs +_screen +_sed +_sh +_showmount +_sisu +_slrn +_socket +_spamassassin +_sqsh +_ssh +_strip +_stty +_su +_subversion +_sudo +_surfraw +_sysctl +_tar +_tardy +_tcptraceroute +_telnet +_texinfo +_tidy +_tiff +_tin +_tla +_todo.sh +_toilet +_totd +_tracepath +_twisted +_unace +_uname +_unexpand +_uniq +_units +_user_admin +_vim +_vorbis +_vorbiscomment +_vux +_w3m +_webbrowser +_wget +_whereis +_whois +_wiggle +_xargs +_xmlsoft +_yafc +_yodl +_yp +_zcat +_zdump +_zip ' diff --git a/Completion/Unix/Command/_arp b/Completion/Unix/Command/_arp new file mode 100644 index 000000000..b46d2daf0 --- /dev/null +++ b/Completion/Unix/Command/_arp @@ -0,0 +1,14 @@ +#compdef arp + +local state line expl curcontext="$curcontext" + +_arguments -C \ + '(-d -s -f 1)-a[show entries for all or specified hosts]:host:->hostintable' \ + '(-a -s -f 1)-d[delete entry from table]:host:->hostintable' \ + '(-a -d -f 1)-s[create an arp entry]:host:_hosts:ethernet address::*:option:(temp trail pub)' \ + '(-a -d -s 1)-f[read multiple entries from file]:file:_files' \ + '(-a)1:host:->hostintable' + +[[ "$state" = hostintable ]] && + _wanted hosts expl 'host' compadd ${${${(f)"$(${words[1]} -a)"}##[ ?(]#}%%[ )]*} + diff --git a/Completion/Unix/Command/_cdrecord b/Completion/Unix/Command/_cdrecord index f651e5954..602cd5e8e 100644 --- a/Completion/Unix/Command/_cdrecord +++ b/Completion/Unix/Command/_cdrecord @@ -89,14 +89,14 @@ if [[ -n $state ]]; then case $state in device) - devices=( ${(f)"$(_call_program device cdrecord -scanbus 2>/dev/null \ + devices=( ${(f)"$(_call_program device $service -scanbus 2>/dev/null \ |grep '^ '|cut -c2-6,23-|sed 's/ /:/')"} ) _describe -t devices device devices && return ;; blank) btypes=( 'help:display list of available blanking types' - ${${${${(f)"$(_call_program blank-types cdrecord blank=help 2>&1)"}[2,-1]}#?}/[[:blank:]]##/:} + ${${${${(f)"$(_call_program blank-types $service blank=help 2>&1)"}[2,-1]}#?}/[[:blank:]]##/:} ) _describe -t blank-types 'blanking type' btypes && return ;; diff --git a/Completion/Unix/Command/_cp b/Completion/Unix/Command/_cp new file mode 100644 index 000000000..9838b1702 --- /dev/null +++ b/Completion/Unix/Command/_cp @@ -0,0 +1,32 @@ +#compdef cp + +_arguments -s \ + '(-a --archive)'{-a,--archive}'[same as -dpR]' \ + '(-b --backup)-b[backup]' \ + '(-b --backup)--backup=:method:(none off numbered t existing nil simple never)' \ + '--copy-contents[copy contents of special files when recursive]' \ + '-d[same as --no-dereference --preserve=link]' \ + '(-f --force)'{-f,--force}'[remove and retry for destinations that cannot be opened]' \ + '(-i --interactive)'{-i,--interactive}'[prompt before overwrite]' \ + '-H[follow command-line symbolic links]' \ + '(-l --link)'{-l,--link}'[link files instead of copying]' \ + '(-L --dereference)'{-L,--dereference}'[always follow symbolic links]' \ + '-p[same as --preserve=mode,ownership,timestamps]' \ + '--preserve=:attributes to preserve:_values -s , attribute mode ownership timestamps links all' \ + '--no-preserve=:attributes not to preserve:_values -s , attribute mode ownership timestamps links all' \ + '--parents[append source path to target directory]' \ + '-P[same as --no-dereference]' \ + '(-R -r --recursive)'{-R,-r,--recursive}'[copy directories recursively]' \ + '--remove-destination[remove each existing destination file before attempting to open it]' \ + '--reply=:how to handle the prompt about an existing destination file:(yes no query)' \ + '--sparse=:when to create sparse files:(auto always never)' \ + '--strip-trailing-slashes[remove any trailing slashes from each source argument]' \ + '(-s --symbolic-link)'{-s,--symbolic-link}'[make symbolic links instead of copies of non-directories]' \ + '(-S --suffix)'{-S,--suffix=}':backup suffix:' \ + '--target-directory=:target directory:_files -/' \ + '(-u --update)'{-u,--update}'[copy only when source is newer than destination or destination is missing]' \ + '(-v --verbose)'{-v,--verbose}'[explain what is being done]' \ + '(-x --one-file-system)'{-x,--one-file-system}'[stay on this file system]' \ + '--help' \ + '--version' \ + '*:file or directory:_files' diff --git a/Completion/Unix/Command/_cplay b/Completion/Unix/Command/_cplay index 24b159425..3b4219173 100644 --- a/Completion/Unix/Command/_cplay +++ b/Completion/Unix/Command/_cplay @@ -5,4 +5,4 @@ _arguments -s \ '-r[toggle playlist repeat mode]' \ '-R[toggle playlist random mode]' \ '-v[toggle PCM and MASTER volume control]' \ - '*:playlist or directory or audio file:_files' + '*:playlist or directory or audio file:_files -g "*.(mp3|mp2|ogg|669|amf|ams|dsm|far|it|med|mod|mt2|mtm|okt|s3m|stm|ult|gdm|xm|m3u|pls|spx|wav|au)"' diff --git a/Completion/Unix/Command/_diffstat b/Completion/Unix/Command/_diffstat new file mode 100644 index 000000000..9b4b2da6e --- /dev/null +++ b/Completion/Unix/Command/_diffstat @@ -0,0 +1,19 @@ +#compdef diffstat + +_arguments \ + '-c[prefix each line with hash mark]' \ + '-e:error file:_files' \ + '-f:histogram format:((0\:concise 1\:normal 2\:dots 3\:dots+normal 4\:value 5\:value+normal 6\:value+dots 7\:value+dots+normal))' \ + '-h[help]' \ + '-k[suppress merging of filenames in report]' \ + '-l[list only the filenames]' \ + '-n:minimum width for filenames:' \ + '-o:output file:_files' \ + '-p:number of path components:' \ + '-f:rounding code:((0\:none 1\:round 2\:round+adjustment))' \ + '-t[overrides histogram, generates csv output]' \ + '-u[suppress sorting of filenames in report]' \ + '-v[show progress]' \ + '-V[print version number]' \ + '-w:maximum width of histogram:' \ + '*:file specifications:_files' diff --git a/Completion/Unix/Command/_flasher b/Completion/Unix/Command/_flasher new file mode 100644 index 000000000..d5820e116 --- /dev/null +++ b/Completion/Unix/Command/_flasher @@ -0,0 +1,29 @@ +#compdef flasher + +_arguments \ + '(--fiasco -F)'{--fiasco,-F}':location of a FIASCO image:_files' \ + '(--kernel -k)'{--kernel,-k}':location of kernel image:_files' \ + '(--initfs -n)'{--initfs,-n}':location of initfs image:_files' \ + '(--rootfs -r)'{--rootfs,-r}':location of root JFFS2 image:_files' \ + '(--xloader -x)'{--xloader,-x}':location of X-Loader image:_files' \ + '(--secondary -s)'{--secondary,-s}':location of NOLO secondary bootloader image:_files' \ + '(--2nd -2)'{--2nd,-2}':location of NOLO cold flasher ("2nd") image:_files' \ + '(--unpack -u)'{--unpack,-u}'::unpack a FIASCO image:_files' \ + '(--flash -f)'{--flash,-f}'[load and flash all supplied images]' \ + '(--load -l)'{--load,-l}'[only load all supplied images]' \ + '(--boot -b)'{--boot,-b}'::kernel cmdline' \ + '(--reboot -R)'{--reboot,-R}'[reboot the board]' \ + '(--read-board-id -i)'{--read-board-id,-i}'[print out the board type]' \ + '(--serial-port -S)'{--serial-port,-S}':serial port used for cold flashing' \ + '(--initialize-port -I)'{--initialize-port,-I}':something' \ + '(--cold-flash -c)'{--cold-flash,-c}'[cold flash the device]' \ + '--enable-rd-mode[enable R&D mode on the device]' \ + '--disable-rd-mode[disable R&D mode on the device]' \ + '--set-rd-flags::R&D mode flags to set' \ + '--clear-rd-flags::R&D mode flags to clear' \ + '--query-rd-mode[query the device R&D mode status and flags]' \ + '--set-root-device:default root device' \ + '--query-root-device[query the default root device]' \ + '--enable-usb-host-mode[set the device into USB host mode]' \ + '--disable-usb-host-mode[set the device into USB peripheral mode]' \ + '--flash-only:components' diff --git a/Completion/Unix/Command/_gcc b/Completion/Unix/Command/_gcc new file mode 100644 index 000000000..402797aa2 --- /dev/null +++ b/Completion/Unix/Command/_gcc @@ -0,0 +1,335 @@ +#compdef gcc g++ -value-,LDFLAGS,-default- -value-,CFLAGS,-default- -value-,CPPFLAGS,-default- + +local curcontext="$curcontext" state line ret=1 expl args args2 +typeset -A opt_args + +if [[ "$service" = -value-* ]]; then + compset -q + words=( fake "$words[@]" ) + (( CURRENT++ )) + if [[ "$service" = *LDFLAGS ]]; then + args2=( '-R:runtime path:->rundir' ) + else + args2=() + fi +else + args2=( '*:input file:_files -g "*.([cCmisSoak]|cc|cxx|ii|k[ih])(-.)"' ) +fi + +args=() +case $MACHTYPE in +m68*) + args=( + -m68000 -m68020 -m68020-40 -m68030 -m68040 -m68881 + -mbitfield -mc68000 -mc68020 -mfpa -mnobitfield + -mrtd -mshort -msoft-float + ) + ;; +vax) + args=( + -mg -mgnu -munix + ) + ;; +c[1234]*) + args=( + -mc1 -mc2 -mc32 -mc34 -mc38 + -margcount -mnoargcount + -mlong32 -mlong64 + -mvolatile-cache -mvolatile-nocache + ) + ;; +amd290?0) + args=( + -m29000 -m29050 -mbw -mnbw -mdw -mndw + -mlarge -mnormal -msmall + -mkernel-registers -mno-reuse-arg-regs + -mno-stack-check -mno-storem-bug + -mreuse-arg-regs -msoft-float -mstack-check + -mstorem-bug -muser-registers + ) + ;; +arm) + args=( + -mapcs -m2 -m3 -m6 -mbsd -mxopen -mno-symrename + ) + ;; +m88k) + args=( + -m88000 -m88100 -m88110 -mbig-pic + -mcheck-zero-division -mhandle-large-shift + -midentify-revision -mno-check-zero-division + -mno-ocs-debug-info -mno-ocs-frame-position + -mno-optimize-arg-area -mno-serialize-volatile + -mno-underscores -mocs-debug-info + -mocs-frame-position -moptimize-arg-area + -mserialize-volatile -msvr3 + -msvr4 -mtrap-large-shift -muse-div-instruction + -mversion-03.00 -mwarn-passed-structs + '-mshort-data--:maximum displacement:' + ) + ;; +rs6000|powerpc*) + args=( + '-mcpu=:CPU type:(rios1 rios2 rsc 501 603 604 power powerpc 403 common)' + -mpower -mno-power -mpower2 -mno-power2 + -mpowerpc -mno-powerpc + -mpowerpc-gpopt -mno-powerpc-gpopt + -mpowerpc-gfxopt -mno-powerpc-gfxopt + -mnew-mnemonics -mno-new-mnemonics + -mfull-toc -mminimal-toc -mno-fop-in-toc -mno-sum-in-toc + -msoft-float -mhard-float -mmultiple -mno-multiple + -mstring -mno-string -mbit-align -mno-bit-align + -mstrict-align -mno-strict-align -mrelocatable -mno-relocatable + -mtoc -mno-toc -mtraceback -mno-traceback + -mlittle -mlittle-endian -mbig -mbig-endian + -mcall-aix -mcall-sysv -mprototype + ) + ;; +romp) + args=( + -mcall-lib-mul -mfp-arg-in-fpregs -mfp-arg-in-gregs + -mfull-fp-blocks -mhc-struct-return -min-line-mul + -mminimum-fp-blocks -mnohc-struct-return + ) + ;; +mips*) + args=( + '-mcpu=:CPU type:(r2000 r3000 r4000 r4400 r4600 r6000_' + -mabicalls -membedded-data + -membedded-pic -mfp32 -mfp64 -mgas -mgp32 -mgp64 + -mgpopt -mhalf-pic -mhard-float -mint64 -mips1 + -mips2 -mips3 -mlong64 -mlong-calls -mmemcpy + -mmips-as -mmips-tfile -mno-abicalls + -mno-embedded-data -mno-embedded-pic + -mno-gpopt -mno-long-calls + -mno-memcpy -mno-mips-tfile -mno-rnames -mno-stats + -mrnames -msoft-float + -m4650 -msingle-float -mmad + -mstats -EL -EB -nocpp + '-G:maximum size for small section objects:' + ) + ;; +i[3456]86|x86_64) + args=( + '-mtune=:CPU type:(i386 i486 i586 pentium pentium-mmx i686 pentiumpro pentium2 pentium3 pentium3m pentium-m pentium4 pentium4m prescott nocona k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp k8 opteron athlon64 athlon-fx winchip-c6 winchip2 c3 c3-2)' + '-march=:CPU type:(i386 i486 i586 pentium pentium-mmx i686 pentiumpro pentium2 pentium3 pentium3m pentium-m pentium4 pentium4m prescott nocona k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp k8 opteron athlon64 athlon-fx winchip-c6 winchip2 c3 c3-2)' + '-mfpmath=:FPU type:(387 sse sse,387)' + '-masm=:asm dialect:(att intel)' + -mieee-fp -mno-ieee-fp -msoft-float + -mno-fp-ret-in-387 -mno-fancy-math-387 + -malign-double -mno-align-double + -m128bit-long-double -m96bit-long-double + -msvr3-shlib -mno-svr3-shlib + -mrtd + '-mregparm=:number of integer argument registers:' + '-mpreferred-stack-boundary=:size of boundary:' + -mmmx -msse -msse2 -msse3 -m3dnow + -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow + -mpush-args -mno-push-args -maccumulate-outgoing-args + -mthreads + -mno-align-stringops -minline-all-stringops + -momit-leaf-frame-pointer + -mtls-direct-seg-refs -mno-tls-direct-seg-refs + -m32 -m64 + -mno-red-zone + '-mcmodel=:memory model:(small kernel medium large)' + -mno-wide-multiply + '-mreg-alloc=:default register allocation order:' + '-malign-jumps=: **2 base for jump goal alignment:' + '-malign-loops=: **2 base for loop alignment:' + '-malign-functions=: **2 base for function alignment:' + ) + ;; +hppa*) + args=( + -mdisable-fpregs -mdisable-indexing -mfast-indirect-calls + -mgas -mjump-in-delay -mlong-millicode-calls -mno-disable-fpregs + -mno-disable-indexing -mno-fast-indirect-calls -mno-gas + -mno-jump-in-delay -mno-millicode-long-calls + -mno-portable-runtime -mno-soft-float -msoft-float + -mpa-risc-1-0 -mpa-risc-1-1 -mportable-runtime + '-mschedule=:code scheduling constraints:(700 7100 7100LC)' + ) + ;; +i960) + args=( + -m{ka,kb,mc,ca,cf,sa,sb} + -masm-compat -mclean-linkage + -mcode-align -mcomplex-addr -mleaf-procedures + -mic-compat -mic2.0-compat -mic3.0-compat + -mintel-asm -mno-clean-linkage -mno-code-align + -mno-complex-addr -mno-leaf-procedures + -mno-old-align -mno-strict-align -mno-tail-call + -mnumerics -mold-align -msoft-float -mstrict-align + -mtail-call + ) + ;; +sparc) + args=( + -mapp-regs -mno-app-regs + -mfpu -mhard-float + -mno-fpu -msoft-float + -mhard-quad-float + -msoft-quad-float + -mno-unaligned-doubles + -munaligned-doubles + -mfaster-structs -mno-faster-structs + -mimpure-text + '-mcpu=:CPU type:(v7 cypress v8 supersparc sparclite f930 f934 hypersparc sparclite86x sparclet tsc701 v9 ultrasparc ultrasparc3)' + '-mtune=:CPU type:(cypress supersparc hypersparc f930 f934 sparclite86x tsc701 ultrasparc ultrasparc3)' + -mv8plus -mno-v8plus + -mvis -mno-vis + -mlittle-endian + -m32 -m64 + '-mcmodel=:memory model:(medlow medmid medany embmedany)' + -mstack-bias -mno-stack-bias + -mv8 + -mcypress -mepilogue -mflat + -mno-flat + -mno-epilogue + -msparclite -msupersparc + -mmedlow -mmedany + -mint32 -mint64 -mlong32 -mlong64 + ) + ;; +alpha*) + args=( + -mfp-regs -mno-fp-regs -mno-soft-float + -msoft-float + ) + ;; +clipper) + args=( + -mc300 -mc400 + ) + ;; +h8/300) + args=( + -mrelax -mh + ) + ;; +esac + + +_arguments -C -M 'L:|-{fW}no-=-{fW} r:|[_-]=* r:|=*' \ + "$args[@]" \ + -c -S -E -v -a -w -C -H -P -s '(-pg)-p' '(-p)-pg' \ + '-o:output file:_files -g "^*.(c|h|cc|C|cxx)(-.)"' \ + '-x:input file language:(c objective-c c++ c-header cpp-output c++-cpp-output assembler assembler-with-cpp none)' \ + '+e-:virtual function definitions in classes:((0\:only\ interface 1\:generate\ code))' \ + '-d-:dump:->dump' \ + '-g-::debugging information type:(gdb coff stabs stabs+ dwarf dwarf+ xcoff xcoff+)' \ + '-O-::optimization level:(0 1 2 3)' \ + '*-M-::output dependencies:((M\:only\ user\ header\ files MD\:output\ to\ file G\:treat\ missing\ header\ files\ as\ generated))' \ + '*-A-:define assertion:' \ + '*-D-:define macro:' \ + '*-U-:undefine macro:' \ + '*-Wp,-:preprocessor option:' \ + '*-Wl,-:linker option:' \ + '*-Xlinker:linker option:' \ + '*-u:pretend symbol to be undefined:' \ + '*-Wa,-:assembler option:' \ + '*-l:library:->library' \ + '*-L-:library search path:_files -/' \ + '*-I-:header file search path:_files -/' \ + '-B-:executable prefix:_files -/' \ + '-b:target machine:' \ + '-V:gcc version:' \ + '-print-file-name=:library:->library' \ + '-print-prog-name=:program:' \ + '*-include:include file:_files -g \*.h\(-.\)' \ + '*-imacros:macro input file:_files -g \*.h\(-.\)' \ + '*-idirafter:second include path directory:_files -/' \ + '*-iprefix:prefix:_files' \ + '*-iwithprefix:second include path directory:_files -/' \ + '*-iwithprefixbefore:main include path directory:_files -/' \ + '*-isystem:second include path directory (system):_files -/' \ + -nostdinc -trigraphs -undef -pipe -ansi \ + -fallow-single-precision -fcond-mismatch -fasm \ + -fbuiltin -fsigned-bitfields -fsigned-char \ + -funsigned-bitfields -funsigned-char -fwritable-strings \ + -traditional -traditional-cpp -trigraphs \ + -fall-virtual -fdollars-in-identifiers -felide-constructors \ + -fenum-int-equiv -fexternal-templates -ffor-scope \ + -fhandle-signatures -fmemoize-lookups -fdefault-inline -fgnu-keywords \ + -fnonnull-objects -foperator-names -fstrict-prototype \ + -fthis-is-variable -nostdinc++ -traditional \ + -fsyntax-only -pedantic -pedantic-errors \ + -Wall -Waggregate-return -Wbad-function-cast \ + -Wcast-align -Wcast-qual -Wchar-subscript -Wcomment \ + -Wconversion -Wenum-clash -Werror -Wformat \ + '-Wid-clash--:minimum identifier difference length:' \ + -Wimplicit -Wimport -Winline \ + '-Wlarger-than--:maximum object length:' \ + -Wmissing-declarations \ + -Wmissing-prototypes -Wnested-externs \ + -Wimport -Woverloaded-virtual -Wparentheses \ + -Wpointer-arith -Wredundant-decls -Wreorder -Wreturn-type -Wshadow \ + -Wstrict-prototypes -Wswitch -Wsynth -Wtemplate-debugging \ + -Wtraditional -Wtrigraphs -Wuninitialized -Wunused \ + -Wwrite-strings \ + -fpretend-float \ + -print-libgcc-file-name \ + -print-search-dirs -save-temps \ + -fcaller-saves -fcse-follow-jumps -fcse-skip-blocks \ + -fdelayed-branch -fexpensive-optimizations \ + -ffast-math -ffloat-store -fforce-addr -fforce-mem \ + -finline-functions -fkeep-inline-functions \ + -fdefault-inline -fdefer-pop -ffunction-cse \ + -finline -fpeephole -fomit-frame-pointer \ + -frerun-cse-after-loop -fschedule-insns \ + -fschedule-insns2 -fstrength-reduce -fthread-jumps \ + -funroll-all-loops -funroll-loops \ + -nostartfiles -nodefaultlibs -nostdlib \ + -static -shared -symbolic \ + '*-fcall-saved--:register saved by function call:' \ + '*-fcall-used--:register clobbered by function call:' \ + '*-ffixed--:fixed register:' \ + -finhibit-size-directive \ + -fno-common -fno-ident -fno-gnu-linker \ + -fpcc-struct-return -fpic -fPIC \ + -freg-struct-return -fshared-data -fshort-enums \ + -fshort-double -fvolatile -fvolatile-global \ + -fverbose-asm -fpack-struct \ + "$args2[@]" && ret=0 + + +case "$state" in +dump) + _values -s '' 'dump information' \ + 'M[only macro definitions]' \ + 'N[macro names]' \ + 'D[macro definitions and normal output]' \ + 'y[debugging information during parsing]' \ + 'r[after RTL generation]' \ + 'x[only generate RTL]' \ + 'j[after jump optimization]' \ + 's[after CSE]' \ + 'L[after loop optimization]' \ + 't[after second CSE pass]' \ + 'f[after flow analysis]' \ + 'c[after instruction combination]' \ + 'S[after first instruction scheduling pass]' \ + 'l[after local register allocation]' \ + 'g[after global register allocation]' \ + 'R[after second instruction scheduling pass]' \ + 'J[after last jump optimization]' \ + 'd[after delayed branch scheduling]' \ + 'k[after conversion from registers to stack]' \ + 'a[all dumps]' \ + 'm[print memory usage statistics]' \ + 'p[annotate assembler output]' && ret=0 + ;; +library) + _wanted libraries expl library \ + compadd - ${^=LD_LIBRARY_PATH:-/usr/lib /usr/local/lib}/lib*.(a|so*)(:t:fr:s/lib//) && ret=0 + ;; +rundir) + compset -P '*:' + compset -S ':*' + _files -/ -S/ -r '\n\t\- /:' "$@" + ;; +esac + +return ret + diff --git a/Completion/Unix/Command/_getconf b/Completion/Unix/Command/_getconf index 13eb51581..e8f9a1b3d 100644 --- a/Completion/Unix/Command/_getconf +++ b/Completion/Unix/Command/_getconf @@ -30,6 +30,13 @@ if [[ CURRENT -eq 2 ]]; then LFS64_CFLAGS LFS64_LDFLAGS LFS64_LIBS LFS64_LINTFLAGS \ && ret=0 + _requested -V confstring \ + expl 'configuration-dependent string variables' \ + compadd -S '' PATH GNU_LIBC_VERSION GNU_LIBPTHREAD_VERSION \ + LFS_CFLAGS LFS_LDFLAGS LFS_LIBS LFS_LINTFLAGS \ + LFS64_CFLAGS LFS64_LDFLAGS LFS64_LIBS LFS64_LINTFLAGS \ + && ret=0 + _requested pathconfig && while _next_label -V pathconfig expl 'system path configuration variables'; do compadd "$expl[@]" -S '' PIPE_BUF _POSIX_CHOWN_RESTRICTED \ diff --git a/Completion/Unix/Command/_gnutls b/Completion/Unix/Command/_gnutls new file mode 100644 index 000000000..b30408199 --- /dev/null +++ b/Completion/Unix/Command/_gnutls @@ -0,0 +1,126 @@ +#compdef gnutls-cli gnutls-cli-debug certtool srptool + +local _gnutls_supported _gnutls_supported_certtypes +local _gnutls_supported_protocols _gnutls_supported_macs +local _gnutls_supported_kx _gnutls_supported_comp +local _gnutls_cli_common_args + +_gnutls_cli_common_args=( + '(-d --debug)'{-d,--debug}':debug level' + '(-p --port)'{-p,--port}':port' + '(-h --help)'{-h,--help}'[help]' \ +) + +case "$service" in + (gnutls-cli) + +_gnutls_supported="$(gnutls-cli --list)" +_gnutls_supported_certtypes=(${(s:, :)${${(M)${(f)_gnutls_supported}:#Certificate types:*}#Certificate types: }}) +_gnutls_supported_protocols=(${(s:, :)${${(M)${(f)_gnutls_supported}:#Protocols:*}#Protocols: }}) +_gnutls_supported_ciphers=(${(s:, :)${${(M)${(f)_gnutls_supported}:#Ciphers:*}#Ciphers: }}) +_gnutls_supported_macs=(${(s:, :)${${(M)${(f)_gnutls_supported}:#MACs:*}#MACs: }}) +_gnutls_supported_kx=(${(s:, :)${${(M)${(f)_gnutls_supported}:#Key exchange algorithms:*}#Key exchange algorithms: }}) +_gnutls_supported_comp=(${(s:, :)${${(M)${(f)_gnutls_supported}:#Compression methods:*}#Compression methods: }}) + +_arguments \ + "$_gnutls_cli_common_args[@]" \ + '(-r --resume)'{-r,--resume}'[resume session]' \ + '(-s --starttls)'{-s,--starttls}'[start TLS on EOF or SIGALRM]' \ + '--crlf[Send CR LF instead of LF]' \ + '--x509fmtder[Use DER format for certificates to read from]' \ + '(-f --fingerprint)'{-f,--fingerprint}'[send the openpgp fingerprint instead of the key]' \ + '--disable-extensions[disable all the TLS extensions]' \ + '--xml[print the certificate information in XML format]' \ + '--print-cert[print the certificate in PEM format]' \ + '--recordsize:maximum record size to advertise:' \ + '(-V --verbose)'{-V,--verbose}'[more verbose output]' \ + '--ciphers:ciphers to enable:('"$_gnutls_supported_ciphers"')' \ + '--protocols:protocols to enable:('"$_gnutls_supported_protocols"')' \ + '--comp:compression methods to enable:('"$_gnutls_supported_comp"')' \ + '--macs:MACs to enable:('"$_gnutls_supported_macs"')' \ + '--kx:key exchange methods to enable:('"$_gnutls_supported_kx"')' \ + '--ctypes:certificate types to enable:('"$_gnutls_supported_certtypes"')' \ + '--x509cafile:certificate file to use:_files' \ + '--x509crlfile:CRL file to use:_files' \ + '--pgpkeyfile:PGP key file to use:_files' \ + '--pgpkeyring:PGP key ring file to use:_files' \ + '--pgptrustdb:PGP trustdb file to use:_files' \ + '--pgpcertfile:PGP public key (certificate) file to use:_files' \ + '--x509keyfile:X.509 key file to use:_files' \ + '--x509certfile:X.509 certificate file to use:_files' \ + '--srpusername:SRP username to use' \ + '--srppasswd:SRP password to use' \ + '--insecure[do not require server cert validation]' \ + '(-l --list)'{-l,--list}'[print list of the supported algorithms/modes]' \ + '(-v --version)'{-v,--version}'[print version number]' \ + '--copyright[print license]' \ + ':hostname:_hosts' + + ;; + (gnutls-cli-debug) + +_arguments \ + "$_gnutls_cli_common_args[@]" \ + '(-v --verbose)'{-v,--verbose}'[more verbose output]' \ + ':hostname:_hosts' + + ;; + + (certtool) +_arguments \ + '(-s --generate-self-signed)'{-s,--generate-self-signed}'[generate a self-signed certificate]' \ + '(-c --generate-certificate)'{-c,--generate-certificate}'[generate a signed certificate]' \ + '--generate-crl[generate a CRL]' \ + '(-u --update-certificate)'{-u,--update-certificate}'[update a signed certificate]' \ + '(-p --generate-privkey)'{-p,--generate-privkey}'[generate a private key]' \ + '(-q --generate-request)'{-q,--generate-request}'[generate a PKCS #10 certificate request]' \ + '(-e --verify-chain)'{-e,--verify-chain}'[verify a PEM encoded certificate chain]' \ + '--verify-crl[verify a CRL]' \ + '--generate-dh-params[generate PKCS #3 encoded Diffie Hellman parameters]' \ + '--get-dh-params[get the included PKCS #3 encoded Diffie Hellman parameters]' \ + '--load-privkey:private key file:_files' \ + '--load-request:certificate request file:_files' \ + '--load-certificate:certificate file:_files' \ + '--load-ca-privkey:certificate authority private key file:_files' \ + '--load-ca-certificate:certificate authority certificate file:_files' \ + '--password:password' \ + '(-i --certificate-info)'{-i,--certificate-info}'[print information on a certificate]' \ + '(-l --crl-info)'{-l,--crl-info}'[print information on a CRL]' \ + '--p12-info[print information on a PKCS #12 structure]' \ + '--p7-info[print information on a PKCS #7 structure]' \ + '--smime-to-p7[convert S/MIME to PKCS #7 structure]' \ + '(-k --key-info)'{-k,--key-info}'[print information on a private key]' \ + '--fix-key[regenerate the parameters in a private key]' \ + '--to-p12[generate a PKCS #12 structure]' \ + '(-8 --pkcs8)'{-8,--pkcs8}'[use PKCS #8 format for private keys]' \ + '--dsa[use DSA keys]' \ + '--hash:hash algorithm for signing:(MD5 SHA1 RMD160)' \ + '--export-ciphers[use weak encryption algorithms]' \ + '--inder[use DER format for input certificates and private keys]' \ + '--xml[use XML format for output certificates]' \ + '--outder[use DER format for output certificates and private keys]' \ + '--bits:number of bits for key generation' \ + '--outfile:output file:_files ' \ + '--infile:input file:_files ' \ + '--template:template file to use for non-interactive operation:_files' \ + '(-d --debug)'{-d,--debug}':debug level' \ + '(-h --help)'{-h,--help}'[show help]' \ + '(-v --version)'{-v,--version}'[show version]' \ + '--copyright[shows license]' + + ;; + (srptool) + +_arguments \ + '(-u --username)'{-u,--username}':username:_users' \ + '(-p --passwd)'{-p,--passwd}':password file:_files' \ + '(-i --index)'{-i,--index}':index of params in tpasswd.conf' \ + '(-s --salt)'{-s,--salt}':salt size for crypt algorithm' \ + '--verify[just verify password]' \ + '(-c --passwd-conf)'{-c,--passwd-conf}':password conf file:_files' \ + '--create-conf:generate a tpasswd.conf file:_files' \ + '(-v --version)'{-v,--version}'[show version]' \ + '(-h --help)'{-h,--help}'[show help]' + + ;; +esac diff --git a/Completion/Unix/Command/_joe b/Completion/Unix/Command/_joe new file mode 100644 index 000000000..96ad0a4f1 --- /dev/null +++ b/Completion/Unix/Command/_joe @@ -0,0 +1,39 @@ +#compdef joe + +_arguments \ + '-asis[characters with codes >127 will be displayed non-inverted]' \ + '-backpath[backup file directory]:backup file directory:_files -/' \ + '-baud[inserts delays for baud rates below 19200]:baud rate:(57600 38400 19200 9600 4800 2400 1200 300)' \ + '-beep[beep on command errors or when cursor goes past extremes]' \ + '-columns[sets the number of screen columns]:num of columns' \ + '-csmode[continued search mode]' \ + '-dopadding[catch up after long terminal commands]' \ + '-exask[^KX verify the file name that it is about to write]' \ + '-force[make sure that last line of the file has a line-feed]' \ + '-help[start editor with help screen on]' \ + '-keepup[update column number and control-key prefix after each keystroke]' \ + '-lightoff[make block highlighting go away after any block command]' \ + '-lines[set the number of screen lines]:num of screen lines' \ + '-marking[text between ^KB and the cursor is highlighted]' \ + '-mid[scroll window and make cursor go to center after]' \ + '-nobackups[prevents making backup files]' \ + '-nonotice[prevents displaying copyright notice on startup]' \ + '-nosta[eliminate top-most status line]' \ + '-noxon[turn off ^S/^Q processing]' \ + '-orphan[extra files get placed in orphaned buffers instead of new windows]' \ + '-pg[specify the number of lines to keep after PgUp/PgDn]:num of lines to keep' \ + '-skiptop[prevents use of top n screen lines]:num of top lines to skip' \ + '+-[number of lines]:number of lines' \ + '-crlf[use CR+LF as end of line sequence, instead of just LF]' \ + '-wordwrap[wrap the previous word when you type past the right margin]' \ + '-autoindent[indentation is duplicated onto the next line]' \ + '-overwrite[typing overwrites existing characters]' \ + '-lmargin[set the left margin]:left margin' \ + '-rmargin[set the right margin]:right margin' \ + '-tab[set the TAB character width]:tab width' \ + '-indentc[set the indentation character for ^K, and ^K.]:indent char for ^K, and ^K.' \ + '-istep[set the indentation step for ^K, and ^K.]:indent step for ^K, and ^K.' \ + '-linums[display line numbers before each line]' \ + '-rdonly[make file read-only]' \ + '-keymap[use an alternate section of joerc for keybindings]:keymap name' \ + '*:files:_files' diff --git a/Completion/Unix/Command/_mh b/Completion/Unix/Command/_mh index 5a9348069..69f6c2da2 100644 --- a/Completion/Unix/Command/_mh +++ b/Completion/Unix/Command/_mh @@ -56,6 +56,12 @@ elif [[ "$prev" = -(no|)cc ]]; then _wanted -C "$prev" values expl 'CC address' compadd all to cc me elif [[ "$prev" = -[rw]cache ]]; then _wanted -C "$prev" values expl cache compadd public private never ask +elif [[ "$prev" = -textfield ]]; then + _wanted -C "$prev" -x headers expl header compadd -M 'm:{a-zA-Z}={A-Za-z}' \ + Subject From To cc +elif [[ "$prev" = -datefield ]]; then + _wanted -C "$prev" -x headers expl header compadd -M 'm:{a-zA-Z}={A-Za-z}' \ + Delivery-Date elif [[ $service = mhparam ]]; then _wanted parameters expl 'MH parameter' compadd - \ ${${(f)"$(mhparam -all)"}%%:*} diff --git a/Completion/Unix/Command/_ping b/Completion/Unix/Command/_ping new file mode 100644 index 000000000..e59f6fa9f --- /dev/null +++ b/Completion/Unix/Command/_ping @@ -0,0 +1,63 @@ +#compdef ping + +if _pick_variant iputils=iputils unix -V; then + + _arguments \ + '-a[audible]' \ + '-A[adaptive]' \ + '-b[allow pinging a broadcast address]' \ + '-B[do not allow ping to change source address]' \ + '-c:count' \ + '-d[set SO_DEBUG on the socket]' \ + '-f[flood ping]' \ + '-i:interval in seconds' \ + '-I:iface:_net_interfaces' \ + '-l:preload number' \ + '-L[suppress loopback of multicast packets]' \ + '-n[numeric output only]' \ + '-p:padding pattern' \ + '-Q:QoS TOS bits' \ + '-q[quiet]' \ + '-r[bypass normal routing tables]' \ + '-R[record route]' \ + '-s:packet size in bytes' \ + '-S:sndbuf' \ + '-t:timeout in seconds' \ + '-T:timestamp option:(tsonly tsandaddr tsprespec)' \ + '-M:Path MTU Discovery strategy:((do\:prohibit\ fragmentation want\:fragment\ locally dont\:do\ not\ set\ DF\ flag))' \ + '-U[print full user-to-user latency]' \ + '-v[verbose]' \ + '-w:deadline in seconds' \ + '-W:seconds to wait for a response' \ + ':host:_hosts' + +else + +# FreeBSD 4.11 + + _arguments \ + '-A[audible for no packet]' \ + '-Q[somewhat quiet]' \ + '-R[record route]' \ + '-a[audible for each packet]' \ + '-d[set SO_DEBUG on the socket]' \ + '-f[flood ping]' \ + '-n[numeric output only]' \ + '-q[quiet]' \ + '-r[bypass normal routing tables]' \ + '-v[verbose]' \ + '-c:count' \ + '-i:wait seconds' \ + '-l:preload number' \ + '-m:ttl' \ + '-p:padding pattern' \ + '-P:IPsec policy' \ + '-s:packet size in bytes' \ + '-S:src addr' \ + '-t:timeout in seconds' \ + '-L[suppress loopback of multicast packets]' \ + '-I:iface:_net_interfaces' \ + '-T:ttl for multicasted packets' \ + ':host:_hosts' + +fi diff --git a/Completion/Unix/Command/_quilt b/Completion/Unix/Command/_quilt index cbb1d90df..a2fd799a6 100644 --- a/Completion/Unix/Command/_quilt +++ b/Completion/Unix/Command/_quilt @@ -1,22 +1,30 @@ #compdef quilt -local _quilt_subcommands expl curcontext="$curcontext" - _arguments \ '--trace' \ '--quiltrc:config file:_files' \ '--version' \ - '*::quilt command:->subcmd' && return 0 - - - _quilt_subcommands=(add files import previous setup annotate fold mail - push snapshot applied fork new refresh top delete graph next remove - unapplied diff grep patches rename upgrade edit header pop series) + ':quilt command:(add files import previous setup annotate fold mail push + snapshot applied fork new refresh top delete graph next remove unapplied + diff grep patches rename upgrade edit header pop series)' \ + '*::subcmd:->subcmd' && return 0 +case "$state" in + (subcmd) -if (( CURRENT == 1 )); then - _describe -t subcommand 'subcommand' _quilt_subcommands -else - # this part should be tailored for subcmds - _files -fi + case "$words[1]" in + (applied|delete|files|graph|header|next|previous|refresh|unapplied) + _wanted -V 'patches' expl 'patch' compadd ${(f)"$(quilt series)"} + ;; + (push) + _wanted -V 'unapplied patches' expl 'patch' compadd ${(f)"$(quilt unapplied)"} + ;; + (pop) + _wanted -V 'applied patches' expl 'patch' compadd ${(f)"$(quilt applied)"} + ;; + (*) + _files + ;; + esac + ;; +esac diff --git a/Completion/Unix/Command/_sed b/Completion/Unix/Command/_sed new file mode 100644 index 000000000..0175364d9 --- /dev/null +++ b/Completion/Unix/Command/_sed @@ -0,0 +1,27 @@ +#compdef sed + +local args + +args=( + '(-n --quiet --silent)'{-n,--quiet,--silent}'[suppress automatic printing of pattern space]' + '(1)*'{-e,--expression=-}'[add sed commands to run]:sed script' + '(1)*'{-f,--file=-}'[add contents of file to commands to run]:file:_files' + '(-e)1: :_guard "^-*" sed script' + ':input file:_files' +) + +if _pick_variant gnu=GNU unix --version; then + args+=( + '(-i --in-place)'{-i-,--in-place=-}'[edit files in place]::suffix for backup' + '(-l --line-length)'{-l,--line-length=-}'[specify line-wrap length for the l command]' + '(-r --regexp-extended)'{-r,--regexp-extended}'[use extended regular expressions]' + '(-s --separate)'{-s,--separate}'[consider files separately instead of as a combined stream]' + '(-u --unbuffered)'{-u,--unbuffered}'[disable data buffering]' + '(- 1 :)--help[print program usage]' + '(- 1 :)'{-V,--version}'[print program version]' + ) +else + args=( "${(@)args:#(|\(*\))(|\*)--*}" ) +fi + +_arguments "$args[@]" diff --git a/Completion/Unix/Command/_su b/Completion/Unix/Command/_su new file mode 100644 index 000000000..6d0f2cd9f --- /dev/null +++ b/Completion/Unix/Command/_su @@ -0,0 +1,69 @@ +#compdef su + +local -A opt_args +local -a args state context +local shell=${words[(i)(-s|--shell=*)]} first='1:user name:_users' +local usr=root line + +if _pick_variant gnu="Free Software Foundation" unix --version; then + args=( + '(--command)-c[pass command to shell]:command string:->command' + '(-c)--command=-[pass command to shell]:command string:->command' + '-f[pass -f to shell (csh)]' + '(--login)-l[use a login shell]' + '(-l)--login[use a login shell]' + '(-p --preserve-environment)-m[do not reset environment]' + '(-m --preserve-environment)-p[do not reset environment]' + '(-m -p)--preserve-environment[do not reset environment]' + '(--shell)-s[run the specified shell]:shell:->shell' + '(-s)--shell=-[run the specified shell]:shell:->shell' + ) +else + args=( + '-c[pass command to shell]:command string:->command' + '-l[use a login shell]' + '-s[run the specified shell]:shell:->shell' + ) +fi + +if [[ $#words -ge 2 && $words[2] != -* && CURRENT -ne 2 ]]; then + usr=$words[2] + first= +fi + +[[ $words[shell] == -s ]] && ((shell++)) + +if [[ CURRENT -ne shell && -n ${words[shell]} ]]; then + shell=${words[shell]#*=} +else + shell="${${(M@)${(@f)$(</etc/passwd)}:#$usr*}##*:}" +fi + +[[ -z $first ]] && compset -n 2 + +_arguments : $args[@] $first "*:${shell:t} arguments:->rest" && return + +case $state in + (command) + compset -q + _normal + return + ;; + (shell) + compadd ${(f)^"$(</etc/shells)"}(N) + return + ;; + (rest) + if [[ -z $shell || $shell = */nologin ]]; then + _arguments "-s[run the specified shell, $usr has no shell]" || + _message "-s option required, $usr has no shell" + compstate[insert]= + else + # Something wrong here: doubles the file listing sometimes + _dispatch ${service}:${context} $shell $shell:t -default- + return + fi + ;; +esac + +return 1 diff --git a/Completion/Unix/Command/_totd b/Completion/Unix/Command/_totd new file mode 100644 index 000000000..4d55d29bb --- /dev/null +++ b/Completion/Unix/Command/_totd @@ -0,0 +1,13 @@ +#compdef totdconfig + +_arguments \ + - set1 \ + '-a[add totd specific options]' \ + '-D[add totd specific config into dhclient-enter-hooks]' \ + '-d:name server:_hosts' \ + '-l[configure resolv.conf]' \ + - set2 \ + '-r:config to remove:(dhcp totd resolv all)' \ + - set3 \ + '-h[help]' + |