From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id efe95ce9 for ; Sun, 11 Nov 2018 08:58:24 +0000 (UTC) Received: (qmail 28 invoked by alias); 11 Nov 2018 08:58:08 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43816 Received: (qmail 17417 invoked by uid 1010); 11 Nov 2018 08:58:08 -0000 X-Qmail-Scanner-Diagnostics: from park01.gkg.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(205.235.26.22):SA:0(-1.6/5.0):. Processed in 3.757841 secs); 11 Nov 2018 08:58:08 -0000 X-Envelope-From: SRS0=zefv=NW=yahoo.co.uk=okiddle@bounces.park01.gkg.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Virus-Scanned: by amavisd-new at gkg.net Authentication-Results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1541926655; bh=NbsaUZM/nHSt7GueWM3FQup4PnQIV67gITW0NOakJuI=; h=From:To:Subject:Date:From:Subject; b=cMLPhtPlEvh2Tx8u1/dQDOGlLCi3CRpFwIpGj2RevKncfVKHD+QsKT0+6drbMsFtYB8cFfMH91SMvkNyWH8d3etvlYmnDswFXlKyaYFM990XLDLQYCA8eAR4hoBXCMs/S93et7pFdX+95duhMMzwAX7JF1NNuyWBKG0vgEMcqHf42iKEkhzJBuJsYvthTaAPb2mknyH/KA6bs7RllU0Mb95MeDR7+F5lgZ6fm0f5raa/ksbh153uf4IZe8RHmjff3LQvmz2empA/pJWKXN86/ViguWuEZ+rlE7VYxYfz/r6JoPw5t2KiL0MKrZlIgihK4orWXFrTPdPI4jt+8x7VQA== X-YMail-OSG: SGSA.OgVM1nY8ms.49eg59VrFZvx5FuVer7MdcDEPIKDKX6L7hycVzZ0WzFLtr_ CzE29eVem4.0WZ5jFFWxy3rSN77dobnPHknVA_887Q0h3NMC9.dQDNZK3cAl5pjt2j.A_MoxcMzd sgNWukW4MlHDA96cr4v9QPBSYqmkDyMjUJg3tC4VRZCVxYifqXzrfkJmSBnaL3ZGJMivoB0lDxLU 06lKIwbA8U_zMUa7y355mtzxKbq2LqlhbQ5FLsMTpuJdNUfS5aJ7h4e893PjfD1vzlZRK1p7KMgh S.evyHAYDLJYw2CrbfT8MaZoI1mrP3KD.oAh8JZaXoLrZTtnv1nrJVohFz9kiTHpvcIYwZTM0JLK _DwFsUnAeqTPmQGDwSCemZPUCPdkZ.4vYx7XHKV7JCRNuHP7tjeJwVOvGCWER21adVkggs0a0DND wc18BefvMhi0q5SEXuFsRvYIYqWKYJsOA8MKb5pn1Fq1GOFJ43sKj6qha1UuQQMxlwgJsUd4UxZ_ UcE9CwdG4WSfCZAWWTxEJHwAof9rfeULCX0wWYzRxcsF.2dUmTbA10OceO0kh4iW2xa5TelOgbgL riEpxBmRsCslbZ8xstHSe34E.sX5J69TJHnRHTzhSzdfFBA.KH7xFKaNz.wGKfvuglg8wChv6FCb b78bq10ZSqzYoKwRD4q0oKpUJM2a655lqne4wHsvcDx1A5CIcpLY8p3Sq44fKSVDy7984Dt9L51l 3Ag0vSoq8_7vn54PmY7V23LcNqUjHk9LF2At_cv2a1Na.sOI2UlgwHDIlm8I9NTgjCSpvQWAwxWc LAt9LoOgRdowVBKPkDlfVw5zkg6pjl_jmLnrtoKQVpSt3.hGr_T5WWMawiG_K_bfVih3woBHKuq5 0godhVlMZ._eCFiqv.zyh5IgtR9JNqSSoFlKz_n.ae1prNKR4pbGd0umthizLGoWLlDMrMwd4Jyb KTGhLd.5JCjxJ.PUWnXnYdku1cO8H2AoXUPhwiprOS7QesTglYcVmXwkOnelesRB5nfTAoOxDpgA - From: Oliver Kiddle To: Zsh workers Subject: PATCH: completion options update MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <52342.1541926649.1@hydra> Content-Transfer-Encoding: quoted-printable Date: Sun, 11 Nov 2018 09:57:29 +0100 Message-ID: <52343-1541926649.807710@PpMv.8Fc5.RHuT> This is the latest installment of the usual completion options update based on -h output comparisons. Applicable versions are: ansible 2.7 dmidecode 3.2 ethtool 4.19 jq 1.6 links 2.17 luarocks 3.0.3 mpc 0.31 tmux 2.8 valgrind 3.14.0 samba 4.9.1 (smbclient) OpenBSD 6.4 (dhclient, ssh, vmctl) util-linux 2.33 (column, losetup, lsblk, script) btrfs 4.17.1 My first attempt to send this failed with a message indicating that the list rejects messages larger than 80K so I'll send the btrfs patch separately. Oliver diff --git a/Completion/BSD/Command/_vmctl b/Completion/BSD/Command/_vmctl index 4e66c2383..66d9081b0 100644 --- a/Completion/BSD/Command/_vmctl +++ b/Completion/BSD/Command/_vmctl @@ -1,16 +1,18 @@ #compdef vmctl = -local context line state state_descr -local -a subcommands vmctl_status -local -A opt_args +local -a subcommands alts = -_vm_name() { - compadd "$@" - ${${${(@f)"$(_call_program vmctl_status vmctl status)"}[= 2,-1]}##* } +_vm_names() { + local expl + _description virtual-machines expl 'virtual machine' + compadd "$@" "$expl[@]" - ${${${(@f)"$(_call_program virtual-machines v= mctl status)"}[2,-1]}##* } } = -_vm_switch() { +_vm_switches() { + local expl + _description virtual-switches expl 'virtual switch' [[ -r /etc/vm.conf ]] && - compadd "$@" - ${${${(M)${(f)"$(columns' \ + '(H)--sysroot=3D[use specified directory as system root]:directory:_dir= ectories' \ '*:device:_files -g "*(-%b)" -P / -W /' \ + fields \ '(H -D --discard -o --output -O --output-all)'{-D,--discard}'[output di= scard capabilities]' \ diff --git a/Completion/Linux/Command/_valgrind b/Completion/Linux/Command= /_valgrind index 4187c3cc1..21b7d88c7 100644 --- a/Completion/Linux/Command/_valgrind +++ b/Completion/Linux/Command/_valgrind @@ -1,8 +1,8 @@ #compdef valgrind -value-,VALGRIND_OPTS,-default- = local curcontext=3D"$curcontext" state line -local -a cmd common common_{mem_null,read_varinfo} -local -a args args_{addrcheck,drd,memcheck,cachegrind,helgrind,lackey,mas= sif,none} +local -a cmd common_{own_malloc,read_varinfo,report_errors,partial} +local -a args args_{addrcheck,drd,memcheck,cachegrind,helgrind,lackey,mas= sif,none,exp_{bbv,dhat,sgcheck}} = cmd=3D( '1: : _command_names -e' @@ -16,31 +16,74 @@ if [[ $service =3D *_OPTS* ]]; then cmd=3D() fi = -common=3D( - '--alignment=3D-[set minimum alignment of allocations]:number' +common_own_malloc=3D( + '--alignment=3D-[set minimum alignment of heap allocations]:number [16]= ' + '--redzone-size=3D-[set minimum size of redzones added before/after hea= p blocks]:size (bytes) [16]' + '--xtree-memory=3D-[profile heap memory in an xtree [none]:(none allocs= full)' + '--xtree-memory-file=3D-[specify xtree memory report file]:file [xtmemo= ry.kcg.%p]:_files' ) = common_read_varinfo=3D( '--read-var-info=3D-[read DWARF3 debug info]:enable:(yes no)' ) = -common_mem_null=3D( +common_report_errors=3D( '--xml=3D-[output everything in XML]:enable:(yes no)' + '--xml-fd=3D-[send XML output to file descriptor]:file descriptor:_file= _descriptors' + '--xml-file=3D-[send XML output to specified file]:file:_files' + '--xml-socket=3D-[send XML output to specified socket]:socket:_hosts' '--xml-user-comment=3D-[copy specified string verbatim to XML output]:s= tring' + '--demangle=3D-[automatically demangle C++ names]:enable:(yes no)' \ + '--num-callers=3D-[specify no of callers to show in stack traces]:numbe= r' \ + '--error-limit=3D-[stop showing new errors if too many]:enable:(yes no)= ' \ + '--exit-on-first-error=3D-[exit on the first error]:enable:(yes no)' \ + '--error-exitcode=3D-[exit code to return if errors found]:exit code' \ + '--error-markers=3D-[add lines with begin/end markers before/after]:mar= kers (begin,end)' \ + '--keep-debuginfo=3D-[keep symbols etc for unloaded code]:enable:(yes n= o)' \ + '--show-below-main=3D-[continue stack traces below main()]:enable [no]:= (yes no)' \ + '--default-suppression=3D-[load default suppressions]:enable [yes]:(yes= no)' \ + '--suppressions=3D-[suppress errors described in specified file]:file:_= files' \ + '--gen-suppressions=3D-[print suppressions for errors detected]:enable:= (yes no)' \ + '--input-fd=3D-[specify file descriptor for input]:file descriptor:_fil= e_descriptors' \ + '--max-stackframe=3D-[assume stack switch for SP changes larger than sp= ecified size]:size (bytes)' \ + "--main-stacksize=3D-[set size of main thread's stack]:size (bytes)" \ +) +[[ $OSTYPE =3D darwin* ]] && common_report_errors+=3D( + '--dsymutil=3D-[run dsymutil on Mac OS X when helpful]:enable [yes]:(ye= s no)' ) = +common_partial=3D'--partial-loads-ok=3D-:enable:(yes no)' + args_addrcheck=3D( - $common + $common_own_malloc $common_mem_null - '--partial-loads-ok=3D-:enable:(yes no)' - '--freelist-vol=3D-[volume of freed blocks queue]:blocks' - '--leak-check=3D-[search for memory leaks at exit]:enable:(yes no)' - '--leak-resolution=3D-[how much bt merging in leak check]:level:(low me= d high)' - '--show-reachable=3D-[show reachable blocks in leak check]:enable:(yes = no)' - '--workaround-gcc296-bugs=3D-:enable:(yes no)' + '--leak-check=3D-[search for memory leaks at exit]:enable [summary]:(no= summary full)' + '--leak-resolution=3D-[specify differentiation of leak stack traces]:le= vel [high]:(low med high)' + '(--show-reachable --show-possibly-lost)--show-leak-kinds=3D-[specify l= eak kinds to show]:leak kind [definite,possible]:_sequence compadd - defin= ite indirect possible reachable' + '--errors-for-leak-kinds=3D-[specify which leak kinds are errors]:leak = kind [definite,possible]:_sequence compadd - definite indirect possible re= achable all none' + '--leak-check-heuristics=3D-[specify heuristics to use for during leak = searches]:heuristic:_sequence compadd - stdstring length64 newarray multip= leinheritance all none' + '(--show-leak-kinds)--show-reachable=3D-[show reachable blocks in leak = check]:enable:(yes no)' + '(--show-leak-kinds)--show-possibly-lost=3D-:enable:(yes no)' + '--xtree-leak=3D-[output leak result in xtree format]:enable [no]:(yes = no)' + '--xtree-leak-file=3D-[specify xtree leak report file]:file [xtleak.kcg= .%p]:_files' + '--undef-value-errors=3D-[check for undefined value errors]:enable [yes= ]:(yes no)' + '--track-origins=3D-[show origins of undefined values]:enable [no]:(yes= no)' + $common_partial + '--expensive-definedness-checks=3D-[use extra-precise definedness track= ing]:enable [auto]:(no auto yes)' + '--freelist-vol=3D-[specify volume of freed blocks queue]:blocks [20000= 000]' + '--freelist-big-blocks=3D-[release first blocks larger than specified s= ize]:size [1000000]' + '--workaround-gcc296-bugs=3D-:enable [no]:(yes no)' + '--ignore-ranges=3D-[assume given addresses are OK]:address ranges' + "--ignore-range-below-sp=3D-[don't report errors for accesses at the gi= ven offsets below SP]:offsets" + "--malloc-fill=3D-[fill malloc'd areas with given value]:value (hex)" + "--free-fill=3D-[fill free'd areas with given value]:value (hex)" + "--keep-stacktraces=3D-[control which stack traces to keep for malloc'd= /free'd areas]:stack traces [alloc-and-free]:(alloc free alloc-and-free al= loc-then-free none)" + "--show-mismatched-frees=3D-[show frees that don't match the allocator]= :enable [yes]:(yes no)" ) = args_drd=3D( + $common_own_malloc + $common_read_varinfo '--check-stack-var=3D-[detect data races on stack variables]:enable [no= ]:(yes no)' '--exclusive-threshold=3D-[print an error if any mutex or writer lock i= s held longer than specified time]:time (ms)' '--first-race-only=3D-[report only the first detected data race]:enable= [no]:(yes no)' @@ -73,11 +116,14 @@ args_memcheck=3D( args_cachegrind=3D( '--I1=3D-[set I1 cache manually]:size,assoc,line_size' '--D1=3D-[set D1 cache manually]:size,assoc,line_size' - '--L2=3D-[set L2 cache manually]:size,assoc,line_size' + '--LL=3D-[set LL cache manually]:size,assoc,line_size' + '--cache-sim=3D-[collect cache stats]:enable [yes]:(yes no)' + '--branch-sim=3D-[collect branch prediction stats]:enable [no]:(yes no)= ' + '--cachegrind-out-file=3D-[specify output file name]:file name [cachegr= ind.out.%p]:_files' ) = args_helgrind=3D( - $common + $common_own_malloc $common_read_varinfo '--free-is-write=3D-[treat heap frees as writes]:enable [no]:(yes no)' '--track-lockorders=3D-[show lock ordering errors]:enable [yes]:(no yes= )' @@ -86,31 +132,68 @@ args_helgrind=3D( approx\:full\ trace\ for\ one\ thread,\ approx\ for\ the\ other\ \(fa= ster\) none\:only\ show\ trace\ for\ one\ thread\ in\ a\ race\ \(fastest\) ))' + '--delta-stacktrace=3D-[derive a stacktrace from the previous stacktrac= e]:enable:(yes no)' '--conflict-cache-size=3D-[specify size of full history cache]:size [20= 00000]' '--check-stack-refs=3D-[race-check reads and writes on the main stack a= nd thread stacks]:enable [yes]:(no yes)' '--ignore-thread-creation=3D-[ignore activities during thread creation]= :enable [no]:(yes no)' ) = args_lackey=3D( - '--fnname=3D-[count calls to specified name]:name' - '--detailed-counts=3D-[count loads, stores and alu ops]:enable:(yes no)= ' + '--basic-counts=3D-[count instructions, jumps, etc.]:enable [yes]:(yes = no)' + '--detailed-counts=3D-[count loads, stores and alu ops]:enable [no]:(ye= s no)' + '--trace-mem=3D-[trace all loads and stores]:enable [no]:(yes no)' + '--trace-superblocks=3D-[trace all superblock entries]:enable [no]:(yes= no)' + '--fnname=3D-[count calls to specified name]:name [main]' ) = args_massif=3D( - $common - '--heap=3D-[profile heap blocks]:enable:(yes no)' - '--heap-admin=3D-[specify average admin bytes per heap block]:bytes' - '--stacks=3D-[enable profile stacks]:enable:(yes no)' - '--depth=3D-[depth of contexts]:depth' - '--alloc-fn=3D-[specify alloc function]:function' - '--format=3D-[specify format of textual output]:format:(text html)' + $common_own_malloc + '--heap=3D-[profile heap blocks]:enable [yes]:(yes no)' + '--heap-admin=3D-[specify average admin bytes per heap block]:size (byt= es) [8]' + '--stacks=3D-[profile stacks]:enable [no]:(yes no)' + '--pages-as-heap=3D-[profile memory at the page level]:enable [no]:(yes= no)' + '--depth=3D-[depth of contexts]:depth [30]' + '*--alloc-fn=3D-[specify alloc function]:function' + '*--ignore-fn=3D-[ignore heap allocations within specified function]:fu= nction' + '--threshold=3D-[specify significance threshold]:threshold (percentage)= [1.0]' + '--peak-inaccuracy=3D-[specify maximum peak inaccuracy]:inaccuracy (per= centage) [1.0]' + "--time-unit=3D-[specify time unit]:unit [i]:(( + i\:instructions\ executed + ms\:milliseconds + b\:heap\ bytes\ alloc\'d/dealloc\'d + ))" + '--detailed-freq=3D-[every Nth snapshot should be detailed]:snapshot in= terval [10]' + '--max-snapshots=3D-[specofy maximum number of snapshots recorded]:maxi= mum [100]' + '--massif-out-file=3D-[specify output file name]:filename [massif.out.%= p]:_files' +) + +args_exp_bbv=3D( + '--bb-out-file=3D-[specify filename for BBV info]:filename:_files' + '--pc-out-file=3D-[specify filename for BB addresses and function names= ]:filename:_files' + '--interval-size=3D-[specify interval size]:size (instructions) [100000= 000]' + '--instr-count-only=3D-[only print total instruction count]:enable:(yes= no)' +) + +args_exp_dhat=3D( + '--show-top-n=3D-[show specified number of the top alloc points]:number= [10]' + '--sort-by=3D-[sort the allocation points by specified metric]:metric [= max-bytes-live]:(( + max-bytes-live\:maximum\ live\ bytes + tot-bytes-allocd\:bytes\ allocated\ in\ total\ \(turnover\) + max-blocks-live\:maximum\ live\ blocks + tot-blocks-allocd\:blocks\ allocated\ in\ total\ \(turnover\) + ))' +) + +args_exp_sgcheck=3D( + $common_partial + '--enable-sg-checks=3D-[enable stack & global array checking]:enable [y= es]:(yes no)' ) = args_none=3D( $common_mem_null ) = -args=3D"args_${${words[(r)--tool=3D*]#*=3D}:-memcheck}" +args=3D"args_${${${words[(r)--tool=3D*]#*=3D}/-/_}:-memcheck}" = _arguments -C ${(P)args} $cmd \ '(--version)--tool=3D-[specify valgrind tool]:valgrind tool:->tools' \ @@ -120,27 +203,43 @@ _arguments -C ${(P)args} $cmd \ '(-q --quiet)'{-q,--quiet}'[run silently; only print error msgs]' \ '(-v --verbose)'{-v,--verbose}'[be more verbose]' \ '--trace-children=3D-[valgrind-ise child processes]:enable:(yes no)' \ + '--trace-children-skip=3D-[specify a list of executables not to trace i= nto]:executables' \ + '--trace-children-skip-by-arg=3D-[specify a list of executables matched= by argv not to trace into]:executables' \ + '--child-silent-after-fork=3D-[omit child output between fork & exec]:e= nable:(yes no)' \ + '--vgdb=3D-[activate gdbserver]:enable [yes]:(yes no full)' \ + '--vgdb-error=3D-[invoke gdbserver after specified number of errors]:er= rors [999999999]:errors' \ + '--vgdb-stop-at=3D-[invoke gdbserver for given events]:event:_sequence = compadd - startup exit valgrindabexit all none' \ '--track-fds=3D-[track open file descriptors]:enable:(yes no)' \ '--time-stamp=3D-[add timestamps to log messages]:enable:(yes no)' \ '--log-fd=3D-[log messages to specified file descriptor]:file descripto= r:_file_descriptors' \ '--log-file=3D-[log messages to specified file with pid appended]:file:= _files' \ - '--log-file-exactly=3D-[log messages to specified file]:file:_files' \ - '--log-file-qualifier=3D-[log messages to filename given by specified e= nvironment variable]:variable:_parameters -g "*scalar*"' \ '--log-socket=3D-[log messages to socket]:ipaddr\:port' \ - '--run-libc-freeres=3D-[free up glibc memory at exit]:enable:(yes no)' = \ - '--sim-hints=3D-[enable hint]:hint:(lax-ioctls enable-outer)' \ - '--show-emwarns=3D-[show warnings about emulation limits]:enable:(yes n= o)' \ - '--kernel-variant=3D-[handle non-standard kernel variants]:kernel varia= nt:_values -s , kernel\ variant bproc' \ - '--demangle=3D-[automatically demangle C++ names]:enable:(yes no)' \ - '--num-callers=3D-[specify no of callers to show in stack traces]:numbe= r' \ - '--error-limit=3D-[stop showing new errors if too many]:enable:(yes no)= ' \ - '--show-below-main=3D-[continue stack traces below main()]:enable:(yes = no)' \ - '--suppressions=3D-[suppress errors described in specified file]:file:_= files' \ - '--gen-suppressions=3D-[print suppressions for errors detected]:enable:= (yes no)' \ - '--db-attach=3D-[start debugger when errors detected]:enable:(yes no)' = \ - '--db-command=3D-[specify command to start debugger]: : _command_names = -e' \ - '--input-fd=3D-[specify file descriptor for input]:file descriptor:_fil= e_descriptors' \ - '--max-stackframe=3D-[assume stack switch for SP changes larger than sp= ecified number of bytes]:bytes' \ + '*--fullpath-after=3D-[show full source paths in call stacks]::prefix t= o remove from paths:_directories' \ + '--extra-debuginfo-path=3D-[specify absolute path to search for additio= nal debug symbols]:path:_directories' \ + '--debuginfo-server=3D-[specify server to query for debug symbols]:serv= er:_hosts' \ + "--allow-mismatched-debuginfo=3D-[accept debuginfo objects that don't m= atch the main object]:enable [no]:(yes no)" \ + '--smc-check=3D-[check for self-modifying code]:checks [all-non-file]:(= none stack all all-non-file)' \ + '--read-inline-info=3D-[read debug info about inlined functions to impr= ove stack traces]:enable:(yes no)' \ + '--vgdb-poll=3D-[specify gdbserver poll max]:basic blocks [5000]' \ + '--vgdb-shadow-registers=3D-[let gdb see the shadow registers]:enable [= yes]:(yes no)' \ + '--vgdb-prefix=3D-[specify prefix for bgdb FIFOs]:prefix:_files' \ + '--run-libc-freeres=3D-[free up glibc memory at exit]:enable [yes]:(yes= no)' \ + '--run-cxx-freeres=3D-[free up libstdc++ memory at exit]:enable [yes]:(= yes no)' \ + '--sim-hints=3D-[activate unusual sim behaviours]:hint [none]:_sequence= compadd - lax-ioctls lax-doors fuse-compatible enable-outer no-inner-pref= ix no-nptl-pthread-stackcache fallback-llsc none' \ + '--fair-sched=3D-[schedule threads fairly on multicore systems]:enable = [no]:(yes no try)' \ + '--kernel-variant=3D-[handle non-standard kernel variants]:kernel varia= nt:_sequence compadd - bproc android-no-hw-tls android-gpu-sgx5xx android-= gpu-adreno3xx' \ + '--merge-recursive-frames=3D-[merge frames between identical program co= unters in specified max frames]:frames [0]' \ + '--num-transtab-sectors=3D-[specify size of translated code cache]:size= (sectors) [32]' \ + '--avg-transtab-entry-size=3D-[specify average size of a translated bas= ic block]:size (bytes)' \ + '--aspace-minaddr=3D-[avoid mapping memory below address]:address (0xPP= ) [guessed]' \ + "--valgrind-stacksize=3D-[specify size of valgrind (host) thread's stac= k]:size (bytes) [1048576]" \ + '--show-emwarns=3D-[show warnings about emulation limits]:enable [no]:(= yes no)' \ + '*--require-text-symbol=3D-[abort run if the specified shared object la= cks specified symbol]:\:soname pattern\:symbol pattern' \ + '*--soname-synonyms=3D-[specify patterns to map sonames to replacements= ]:soname=3Dreplacement' \ + '--sigill-diagnostics=3D-[warn about illegal instructions]:enable [yes]= :(yes no)' \ + '--unw-stack-scan-thresh=3D-[enable stack-scan unwind if fewer than spe= cified number of good frames found]:frames' \ + '--resync-filter=3D-[attempt to avoid expensive address-space-resync op= erations]:enable:(yes no verbose)' \ + '--max-threads=3D-[specify maximum number of threads that valgrind can = handle]:threads [500]' \ && return = typeset -a tools @@ -151,12 +250,10 @@ if [[ -n "$state" ]]; then # Basically uses debug output to find out the directory where the tools= are # present and lists all executables in that directory. # Hope the program provides a neater interface some day! - () { - setopt localoptions histsubstpattern - tools=3D( ${${${(M)${(f)"$(_call_program tools valgrind --tool=3Dsome= thing -d 2>&1)"}:#*launcher launching *something*}##*launcher launching }%= %something*}*~*.*(*:t:s/-*//) ) - typeset -U tools - } - _wanted tools exl 'valgrind tool' compadd $tools && return + tools=3D( ${${${${(M)${(f)"$(_call_program tools $words[1] --tool=3Dsom= ething -d 2>&1)"}:#*launcher launching *something*}##*launcher launching }= %%something*}:-${commands[valgrind]:h:h}/lib/valgrind/}*~*.*(*:t) ) + tools=3D( ${tools%-*-*} ) + typeset -U tools + _wanted tools exl 'valgrind tool' compadd -a tools && return fi = return 1 diff --git a/Completion/Unix/Command/_ansible b/Completion/Unix/Command/_a= nsible index 330ef66b7..89a4998b7 100644 --- a/Completion/Unix/Command/_ansible +++ b/Completion/Unix/Command/_ansible @@ -1,6 +1,6 @@ #compdef ansible ansible-config ansible-console ansible-doc ansible-galax= y ansible-inventory ansible-playbook ansible-pull ansible-vault = -local curcontext=3D"$curcontext" plug plugvar ret=3D1 +local curcontext=3D"$curcontext" plug plugvar ign ret=3D1 local -a args state line local -A opt_args = @@ -30,7 +30,7 @@ case $service in '(-D --diff)'{-D,--diff}'[show differences when changing small file= s and templates]' '(-b --become)'{-b,--become}'[escalate privileges on remote system]= ' '(-f --forks)'{-f+,--forks=3D}'[specify number of parallel processe= s to use]:processes [5]' - '--become-method=3D[specify privilege escalation method to use]:met= hod [sudo]:(sesu sudo su pbrun pfexec doas dzdo ksu runas pmrun enable)' + '--become-method=3D[specify privilege escalation method to use]:met= hod [sudo]:(sudo su pbrun pfexec doas dzdo ksu runas pmrun enable machinec= tl)' '--become-user=3D[specify remote user for running operations]:user:= _users' "--syntax-check[perform a syntax check on the playbook, but don't e= xecute it]" '!(-R --su-user -U --sudo-user)'{-R,-U,--su-user,--sudo-user}':user= [root]:_users' @@ -102,6 +102,7 @@ case $service in ;; ansible-doc) args+=3D( + '!(-l --list -F --list_files -s --snippet)'{-j,--json} # "internal = testing only" '(-l --list -F --list_files -s --snippet)'{-l,--list}'[list availab= le plugins]' '(-l --list -F --list_files -s --snippet)'{-F,--list_files}'[show p= lugin names and their source files without summaries]' '(-l --list -F --list_files -s --snippet)'{-s,--snippet}'[show play= book snippet for specified plugins]' @@ -143,6 +144,7 @@ case $service in ansible-pull) args+=3D( "--check[don't make any changes]" + '--diff[show the differences in changed files]' '(-d --directory)'{-d+,--directory=3D}'[specify directory to checko= ut repository to]:directory:_directories' '--full[do a full instead of a shallow clone]' '(-m --module-name)'{-m+,--module-name=3D}'[specify repository modu= le used for checking out repository]:module:(git subversion hg bzr)' @@ -167,9 +169,10 @@ case $service in ;; esac = +(( $#words > 2 )) && ign=3D'!' _arguments -s -S -C $args \ - '(- :)--version[display version information]' \ - '(- :)'{-h,--help}'[display usage information]' \ + "${ign}(- :)--version[display version information]" \ + "${ign}(- :)"{-h,--help}'[display usage information]' \ \*{-v,--verbose}"[verbose mode (repeat to increase)]" && ret=3D0 = plug=3D${(v)opt_args[(i)-(t|-type)]:-module} @@ -220,11 +223,18 @@ case $state in fi ;; galaxy) + ign=3D'' curcontext=3D"${curcontext%:*}-${line[1]}:" - args=3D() + (( $#words > 2 )) && ign=3D'!' + args=3D( + "${ign}(-)"{-h,--help}'[display usage information]' + '(-c --ignore-certs)'{-c,--ignore-certs}'[ignore SSL certificate va= lidation errors]' + '(-s --server)'{-s+,--server=3D}'[specify API server destination]:s= erver:_hosts' + {-v,--verbose}'[verbose mode]' + ) case $line[1] in info|search|list|remove|install) - args=3D( '(-p --roles-path)'{-p,--roles-path}'[specify location of roles= ]:path:_directories' ) + args+=3D( '(-p --roles-path)'{-p,--roles-path}'[specify location of role= s]:path:_directories' ) ;| info|init) args+=3D( "--offline[don't query the galaxy API]" ) @@ -241,22 +251,23 @@ case $state in ) ;; setup) - args=3D( + args+=3D( '--list[list integrations]' '--remove=3D[remove integration]:integration id' ) ;; init) args+=3D( - '--container-enabled[initialize the skeleton role with default content= s for a Container Enabled role]' '--init-path=3D[specify path in which the skeleton role will be= created]:path:_directories' '--role-skeleton=3D[specify path to a role skeleton that the ne= w role should be based upon]' + '--type=3D[initialize using an alternate role type]:role type:(contain= er apb network)' ) ;; install) args+=3D( '(-n --no-deps)'{-n,--no-deps}"[don=E2=80=99t download roles listed as= dependencies]" '(-i --ignore-errors)'{-i,--ignore-errors}'[ignore errors and continue= with the next specified role]' + '(-g --keep-scm-meta)'{-g,--keep-scm-meta}'[use tar instead of the scm= archive option when packaging the role]' '(-r --role-file)'{-r+,--role-file=3D}'[specify file containing a list= of roles to be imported]:file:_files' ) ;; diff --git a/Completion/Unix/Command/_column b/Completion/Unix/Command/_co= lumn index cb67fef37..a81684dba 100644 --- a/Completion/Unix/Command/_column +++ b/Completion/Unix/Command/_column @@ -9,6 +9,7 @@ case $OSTYPE in linux-gnu) args=3D( '(info json -c --output-width)'{-c+,--output-width=3D}'[format outp= ut to fit display of specified width]:width' + '(info)'{-L,--table-empty-lines}"[don't ignore empty lines]" + fill '(info table text json -x --fillrows)'{-x,--fillrows}'[fill rows be= fore filling columns]' + table diff --git a/Completion/Unix/Command/_dhclient b/Completion/Unix/Command/_= dhclient index beaab5e2d..ee309e1fd 100644 --- a/Completion/Unix/Command/_dhclient +++ b/Completion/Unix/Command/_dhclient @@ -22,6 +22,7 @@ case $OSTYPE in '-i+[ignore values provided by leases for specified options]:option= s' '-L+[specify file to write option data too]:file:_files' "-n[don't configure any interfaces]" + '-r[release the current lease back to the server it came from]' '-v[verbose log messages]' ) ;; diff --git a/Completion/Unix/Command/_dmidecode b/Completion/Unix/Command/= _dmidecode index eb273586f..047b74f6d 100644 --- a/Completion/Unix/Command/_dmidecode +++ b/Completion/Unix/Command/_dmidecode @@ -4,10 +4,11 @@ _arguments -s \ '(-d --dev-mem --from-dump)'{-d+,--dev-mem=3D}'[read memory from specif= ied file]:memory device [/dev/mem]:_files' \ '(-)'{-h,--help}'[display usage information]' \ '(-q --quiet -u --dump)'{-q,--quiet}'[be less verbose]' \ - '(--type -u --dump --dump-bin -s --string)'{-s+,--string=3D}':DMI strin= g:(bios-vendor bios-version bios-release-date system-manufacturer system-p= roduct-name system-version system-serial-number system-uuid baseboard-manu= facturer baseboard-product-name baseboard-version baseboard-serial-number = baseboard-asset-tag chassis-manufacturer chassis-type chassis-version chas= sis-serial-number chassis-asset-tag processor-family processor-manufacture= r processor-version processor-frequency)' \ - '(-s --string --dump-bin)*'{-t+,--type=3D}'[only display entries of spe= cified type]:entry type:(bios system baseboard chassis processor memory ca= che connector slot)' \ + '(-t --type -H --handle -u --dump --dump-bin -s --string)'{-s+,--string= =3D}'[only display value of specified DMI string]:DMI string:(bios-vendor = bios-version bios-release-date system-manufacturer system-product-name sys= tem-version system-serial-number system-uuid baseboard-manufacturer basebo= ard-product-name baseboard-version baseboard-serial-number baseboard-asset= -tag chassis-manufacturer chassis-type chassis-version chassis-serial-numb= er chassis-asset-tag processor-family processor-manufacturer processor-ver= sion processor-frequency)' \ + '(-s --string -H --handle --dump-bin)*'{-t+,--type=3D}'[only display en= tries of specified type]:entry type:(bios system baseboard chassis process= or memory cache connector slot)' \ + '(-s --string -t --type -H --handle --dump-bin)'{-H,--handle=3D}'[only = display the entry of specified handle]:handle' \ '(-q --quiet -u --dump -s --string)'{-u,--dump}"[don't decode entries]"= \ - '--dump-bin=3D[dump DMI data to a binary file]:file:_files' \ + '(-s --string -t --type -H --handle)--dump-bin=3D[dump DMI data to a bi= nary file]:file:_files' \ '(-d --dev-mem)--from-dump=3D[read DMI data from a binary file]:file:_f= iles' \ "--no-sysfs[don't attempt to read DMI data from sysfs files]" \ '--oem-string=3D[only display the value of the specified OEM string]:OE= M string number' \ diff --git a/Completion/Unix/Command/_jq b/Completion/Unix/Command/_jq index 4ff05dab4..b8e41dd66 100644 --- a/Completion/Unix/Command/_jq +++ b/Completion/Unix/Command/_jq @@ -27,8 +27,11 @@ _arguments -S -s : \ '(-f --from-file)'{-f,--from-file}'[read filter from file]:_files' \ '-L+[prepend a directory to the module search path]:_directories' \ '(-e --exit-status)'{-e,--exit-status}'[report "false" and "null" resul= ts via exit code]' \ - '*--arg[pre-set a variable to a string]: :_guard "|[A-Za-z][A-Za-z0-9]#= " "variable name":value (string): ' \ - '*--argjson[pre-set a variable to an object]: :_guard "|[A-Za-z][A-Za-z= 0-9]#" "variable name":value (JSON): ' \ - '*--slurpfile[pre-set a variable to contents of a file]: :_guard "|[A-Z= a-z][A-Za-z0-9]#" "variable name":value (filename of file containing JSON)= :_files' \ + '*--arg[pre-set a variable to a string]:variable name: :value (string)'= \ + '*--argjson[pre-set a variable to an object]:variable name: :value (JSO= N)' \ + '*--slurpfile[pre-set a variable to an array of JSON texts read from a = file]:variable name: :file:_files' \ + '*--rawfile[pre-set a variable to the contents of a file]:variable name= : :file:_files' \ + '--args[remaining arguments are string arguments, not files]' \ + '--jsonargs[remaining arguments are JSON arguments, not files]' \ "1: :_guard '|[^-]' filter" \ "*: :_files" diff --git a/Completion/Unix/Command/_links b/Completion/Unix/Command/_lin= ks index 34bb64560..8bb9fee1c 100644 --- a/Completion/Unix/Command/_links +++ b/Completion/Unix/Command/_links @@ -1,30 +1,121 @@ -#compdef links +#compdef links links2 = -local curcontext=3D"$curcontext" state line ret=3D1 +local curcontext=3D"$curcontext" state line ign ret=3D1 typeset -A opt_args = +(( $#words > 2 )) && ign=3D'!' _arguments -C \ - '(-help)-anonymous[restrict links so that it can run on an anonymous ac= count]' \ - '(-help)-assume-codepage[specify default codepage to use]:codepage' \ - '(-help)-async-dns[asynchronous DNS resolver]:bool:((0\:on 1\:off))' \ - '(-help)-download-dir[default download directory]:_files -/' \ - '(-help)-driver[graphics driver to use]:graphics driver:->graphics_driv= ers' \ - '(-help)-dump[dump the page as pure text]' \ - '(-help)-format-cache-size[number of formatted document pages cached]:p= ages' \ - '(-help)-ftp-proxy[specify ftp proxy server]:proxy:->proxies' \ - '(-help)-g[run in graphics mode rather than plain text mode]' \ - '-help[prints the help screen]' \ - '(-help)-http-proxy[specify web proxy server]:proxy:->proxies' \ - '(-help)-image-cache-size[image cache memory]:memory (kilobytes)' \ - '(-help)-max-connections[maximum number of concurrent connections]:conn= ections' \ - '(-help)-max-connections-to-host[maximum number of concurrent connectio= n to a given host]:connections' \ - '(-help)-memory-cache-size[cache memory]:kilobytes' \ - '(-help)-no-connect[runs links as a separate instance]' \ - '(-help)-receive-timeout[timeout on receive]:timeout (seconds)' \ - '(-help)-retries[number of retries]:retries' \ - '(-help)-source[dump the source page]' \ - '(-help)-unrestartable-receive-timeout[timeout on non restartable conne= ctions]:timeout (seconds)' \ - '(-help)-version[prints the links version number and exit]' \ + "${ign}-help[prints the help screen]" \ + "${ign}(- :)-version[prints the links version number and exit]" \ + "${ign}(- 1)-lookup[do hostname lookup]:hostname:_hosts" \ + '-g[run in graphics mode rather than plain text mode]' '!-no-g' \ + '-driver[graphics driver to use]:graphics driver:->graphics_drivers' \ + '-mode[specify graphics mode]:graphics mode' \ + '-display[specify X display]:display:_x_display' \ + '-force-html[treat files with unknown type as html rather than text]' \ + '-source[dump the source page]' \ + '-dump[dump the page as pure text]' \ + '-width[specify screen width for formatting with -dump]:width' \ + '-codepage[convert output to specified character set with -dump]:codepa= ge' \ + '-anonymous[restrict links so that it can run on an anonymous account]'= \ + '-no-connect[runs links as a separate instance]' \ + '-download-dir[default download directory]:_files -/' \ + '-language[set user interface language]:language' \ + '-max-connections[specify maximum number of concurrent connections]:con= nections [10]' \ + '-max-connections-to-host[maximum number of concurrent connection to a = given host]:connections [2]' \ + '-retries[number of retries]:retries [3]' \ + '-receive-timeout[timeout on receive]:timeout (seconds) [120]' \ + '-unrestartable-receive-timeout[timeout on non-restartable connections]= :timeout (seconds) [600]' \ + '-timeout-when-trying-multiple-addresses[specify timeout for connection= when trying multiple addresses]:timeout (seconds)' \ + '-bind-address[use a specific local IP address]:IP address' \ + '-bind-address-ipv6[use a specific local IPv6 address]:IPv6 address' \ + "-no-libevent[don't use libevent library]" \ + "-no-openmp[don't use OpenMP]" \ + '-async-dns[asynchronous DNS resolver]:enable:((1\:on 0\:off))' \ + '-download-utime[set time of downloaded files to last modification time= reported by server]:enable:((1\:on 0\:off))' \ + '-format-cache-size[number of formatted document pages cached]:pages [5= ]' \ + '-memory-cache-size[cache memory]:size (bytes) [1048576]' \ + '-image-cache-size[image cache memory]:size (bytes) [1048576]' \ + '-font-cache-size[specify font cache size]:size (bytes) [2097152]' \ + "-aggressive-cache[cache everything regardless of server's caching reco= mendations]:enable [1]:((1\\:on 0\\:off))" \ + '-address-preference[specify IP version preference]:preference:(( + 0\:system\ default + 1\:prefer\ IPv4 + 2\:prefer\ IPv6 + 3\:use\ only\ IPv4 + 4\:use\ only\ IPv6 + ))' \ + '-http-proxy[specify web proxy server]:proxy:->proxies' \ + '-ftp-proxy[specify ftp proxy server]:proxy:->proxies' \ + '-https-proxy[specify https web proxy server]:proxy:->proxies' \ + '-socks-proxy[specify socks4a proxy server]:proxy:->sproxies' \ + '-append-text-to-dns-lookups[append text to dns lookups; useful for spe= cifying fixed tor exit node]:text' \ + '-no-proxy-domains[use no proxy for specified domains]:domain list' \ + '-only-proxies[only initiate connections via proxy]:enable:((0\:off 1\:= on))' \ + '-ssl.certificates[specify handling of invalid signatures]:handling:((0= \:ignore 1\:warn 2\:reject))' \ + '-ssl.builtin-certificates[specify certificates to use]:certificates:((= 0\:system 1\:builtin))' \ + '-ssl.client-cert-key[specify user private key for client certificate a= uthentication]:PEM file:_files' \ + '-ssl.client-cert-crt[specify user certificate for client certificate a= uthentication]:PEM file:_files' \ + '-ssl.client-cert-password[specify password for the user private key]:p= assword' \ + '-http-bugs.http10[specify HTTP version]:protocol [0]:((1\:force\ only\= HTTP\ 1.0 0\:use\ both\ HTTP\ 1.0\ and\ 1.1))' \ + '-http-bugs.allow-blacklist[use list of servers with broken HTTP/1.1 su= pport]:allow [1]:(1 0)' \ + '-http-bugs.bug-no-accept-charset[specify sending of Accept-Charset fie= ld of HTTP header]:send [0]:(1 0)' \ + '-http-bugs.no-compression[advertise HTTP compression support]:advertis= e compression [0]:((0\:yes 1\:no))' \ + '-http-bugs.retry-internal-errors[retry on internal server errors (50x)= ]:retry [0]:((1\:yes 0\:no))' \ + '-http.fake-firefox[fake Firefox in the HTTP header]:enable [0]:((0\:no= 1\:yes))' \ + '-http.do-not-track[send do not track request in the HTTP header]:enabl= e [0]:(1 0)' \ + "-http.referer[control sending of referer URL in requests]:referer [4]:= (( + 0\:don\'t\ send 1\:'send requested URL' 2\:'fake referer' 3\:'send re= al' + 4\:'send real only to the same server' + ))" \ + '-http.fake-user-agent[specify fake user agent value]:string' \ + '-http.extra-header[specify extra string added to HTTP header]:string' = \ + '-ftp.anonymous-password[specify password for anonymous ftp access]:pas= sword' \ + '-ftp.use-passive[use ftp PASV command to bypass firewalls]:enable;(0 1= )' \ + '-ftp.use-eprt-epsv[use EPRT and EPSV commands instead of PORT and PASV= ]:enable:(0 1)' \ + '-ftp.set-iptos[set IP type-of-service to high throughput on ftp connec= tions]:enable:(0 1)' \ + '-smb.allow-hyperlinks-to-smb[allow hyperlinks to SMB protocol]:enable:= (0 1)' \ + '-menu-font-size[specify size of font in menu]:size' \ + '-menu-background-color[specify menu background color in graphics mode]= :color (0xRRGGBB)' \ + '-menu-foreground-color[specify menu foreground color in graphics mode]= :color (0xRRGGBB)' \ + '-scroll-bar-area-color[set colour of scroll bar area]:colour (0xRRGGBB= )' \ + '-scroll-bar-bar-color[set colour of scroll bar]:colour (0xRRGGBB)' \ + '-scroll-bar-frame-color[set colour of scroll bar frame]:colour (0xRRGG= BB)' \ + '-bookmarks-file[specify file to store bookmarks]:file:_files' \ + '-bookmarks-codepage[specify character set of bookmarks file]:character= set' \ + '-save-url-history[save URL history on exit]:enable:(0 1)' \ + '-display-red-gamma[specify red gamma of display]:gamma [2.2]' \ + '-display-green-gamma[specify green gamma of display]:gamma [2.2]' \ + '-display-blue-gamma[specify blue gamma of display]:gamma [2.2]' \ + '-user-gamma[specify additional gamma]:gamma [1]' \ + '-bfu-aspect[display aspect ration]' \ + '-dither-letters[do letter dithering]:enable:(0 1)' \ + '-display-optimize[optimize for display type]:display:((0\:CRT 1\:LCD\ = RGB 2\:LCD\ BGR))' \ + '-gamma-correction[specify type of gamma correction]:gamma correction:(= (0\:8-bit 1\:16-bit 2\:auto\ detect))' \ + '-overwrite-instead-of-scroll[overwrite the screen instead of scrolling= it]:enable:(0 1)' \ + '-html-assume-codepage[specify codepage to use if unspecified by server= ]:codepage' \ + '-html-hard-assume[always use character set from -html-assume-codepage]= :enable:(0 1)' \ + '-html-tables[render tables]:enable:(0 1)' \ + '-html-frames[render frames]:enable:(0 1)' \ + '-html-images[display links to unnamed images as \[IMG\]]:enable:(0 1)'= \ + '-html-image-names[display filename of an image]:enable:(0 1)' \ + '-html-display-images[display images in graphics mode]:enable:(0 1)' \ + '-html-image-scale[sScale images in graphics mode]:scaling (percent)' \ + '-html-bare-image-autoscale[autoscale images displayed on full screen]:= enable:(0 1)' \ + '-html-numbered-links[number links in text mode allowing quick selectio= n]:enable:(0 1)' \ + '-html-table-order[set ordering to walk tables]:ordering:((0\:rows 1\:c= olumns))' \ + '-html-auto-refresh[process refresh or display link]:refresh:(1 0)' \ + '-html-target-in-new-window[allow opening new windows from html]' \ + '-html-margin[specify margin]:margin (spaces)' \ + '-html-user-font-size[specify font size in graphics mode]:size' \ + '-html-t-text-color[specify text color in text mode]:color (0..15)' \ + '-html-t-link-color[specify link color in text mode]:color (0..15)' \ + '-html-t-background-color[specify background color in text mode]:color = (0..15)' \ + '-html-t-ignore-document-color[ignore colors from HTML in text mode]:ig= nore:(0 1)' \ + '-html-g-text-color[specify text color in graphics mode]:color (0xRRGGB= B)' \ + '-html-g-link-color[specify link color in graphics mode]:color (0xRRGGB= B)' \ + '-html-g-background-color[specify background color in graphics mode]:co= lor (0xRRGGBB)' \ + '-html-g-ignore-document-color[ignore colors from HTML in graphics mode= ]:ignore:(0 1)' \ ':URL:->html' && ret=3D0 = case $state in @@ -33,9 +124,15 @@ case $state in ;; graphics_drivers) local -a vals - vals=3D( ${=3D${${${(f)"$(_call_program links-graphics-drivers links = -driver help 2>&1)"}[-1]}//','/''}} ) + vals=3D( ${=3D${${${(f)"$(_call_program links-graphics-drivers $words= [1] -driver help 2>&1)"}[-1]}//','/''}} ) _describe -t links-graphics-drivers 'graphics driver' vals && ret=3D0 ;; + sproxies) + if ! compset -P '*@'; then + _message -e users 'user id' + return + fi + ;& proxies) local suf=3D-S: if compset -P '*:'; then diff --git a/Completion/Unix/Command/_luarocks b/Completion/Unix/Command/_= luarocks index 363cedc8d..30bda1a9a 100644 --- a/Completion/Unix/Command/_luarocks +++ b/Completion/Unix/Command/_luarocks @@ -9,6 +9,7 @@ __luarocks_command(){ doc:'show documentation for an installed rock' download:'download a specific rock file from a rocks server' help:'help on commands' + init:'initialize a directory for a Lua project using LuaRocks' install:'install a rock' lint:'check syntax of a rockspec' list:'list currently installed rocks' @@ -20,13 +21,27 @@ __luarocks_command(){ remove:'uninstall a rock' search:'query the LuaRocks servers' show:'show information about an installed rock' + test:'run the test suite in the current directory' unpack:'unpack the contents of a rock' upload:'upload a rockspec to the public rocks repository' + which:'indicate which file corresponds to a given module name' write_rockspec:'write a template for a rockspec file' ) _describe -t commands 'command' commands "$@" } + local option_deps_modes=3D'--deps-mode=3D[specify how to handle dependenc= ies]:mode:__luarocks_deps_modes' + +local rockspec_options=3D( + '--license=3D[specify a license string]:license (e.g. "MIT/X11" or "GNU= GPL v3")' + '--summary=3D[a short one-line description summary]:summary:{_message -= e "short summary of the rock"}' + '--detailed=3D[a longer description string]:detailed_text:{_message -e = "detailed description of the rock"}' + '--homepage=3D[project homepage]:URL:_urls' + '--lua-versions=3D[specify supported Lua versions]:lua version:_sequenc= e compadd - 5.{1,2,3,4}' + '--rockspec-format=3D[rockspec format version, such as "1.0" or "1.1"]:= VER: ' + '--lib=3D[comma separated list of C library files to link to]:library f= iles' +) + (( $+functions[__luarocks_deps_modes] )) || __luarocks_deps_modes(){ local modes=3D( @@ -78,10 +93,7 @@ __luarocks_rock_version(){ i=3D$(( i + 1 )) done } -(( $+functions[__luarocks_lua_versions] )) || -__luarocks_lua_versions(){ - _values -s , 5.3 5.2 5.1 -} + (( $+functions[___luarocks_manually_store_cache_configs_paths] )) || ___luarocks_manually_store_cache_configs_paths(){ user_config_path=3D"$(_call_program user_config_path luarocks config --= user-config)" @@ -397,6 +409,15 @@ _luarocks_download(){ _luarocks_help(){ _arguments '1: :__luarocks_command' } + +(( $+functions[_luarocks_init] )) || +_luarocks_init(){ + _arguments $rockspec_options \ + '--reset[regenerate files if they already exist]' \ + '1: :_guard "^-*" "name"'\ + '2: :_guard "^-*" "version"' +} + # arguments: # - must: .rockspec file / external rock # - optional: version @@ -453,11 +474,11 @@ _luarocks_pack(){ # arguments: # NOTE: receives only options local path_command_options=3D( - '--bin[adds the system path to the output]' - '--append[appends the paths to the existing paths]' - '--lr-path[exports the Lua path (not formatted as shell command)]' - '--lr-cpath[exports the Lua cpath (not formatted as shell command)]' - '--lr-bin[exports the system path (not formatted as shell command)]' + "--no-bin[don't export the PATH variable]" + '--append[append the paths to the existing paths]' + '--lr-path[export the Lua path (not formatted as shell command)]' + '--lr-cpath[export the Lua cpath (not formatted as shell command)]' + '--lr-bin[export the system path (not formatted as shell command)]' ) (( $+functions[_luarocks_path] )) || _luarocks_path(){ @@ -495,13 +516,14 @@ _luarocks_remove(){ local search_command_options=3D( '--source[return only rockspecs and source rocks]' '--binary[return only pure Lua and binary rocks (rocks that can be used= with the "install" command without requiring a C toolchain)]' - '--all[list all contents of the server that are suitable to this platfo= rm, do not filter by name]' + "--all[list all contents of the server that are suitable for this platf= orm, don't filter by name]" + '--porcelain[produce machine readable output]' ) (( $+functions[_luarocks_search] )) || _luarocks_search(){ _arguments \ "${search_command_options[@]}" \ - '*:SEARCH QUERY:' + '*: :_guard "^--*" "search query"' } # arguments: # - must: installed rock @@ -509,6 +531,8 @@ local show_command_options=3D( '--home[home page of project]' '--modules[all modules provided by this package as used by require()]' '--deps[packages this package depends on]' + '--build-deps[show build-only dependencies for package]' + '--test-deps[show dependencies for testing package]' '--rockspec[the full path of the rockspec file]' '--mversion[the package version]' '--rock-tree[local tree where rock is installed]' @@ -520,6 +544,16 @@ _luarocks_show(){ "${show_command_options[@]}" \ "1: :{__luarocks_rock 'installed' "${opt_args[--tree]}"}" } + +(( $+functions[_luarocks_test] )) || +_luarocks_test(){ + _arguments $option_deps_modes \ + '--test-type=3D[specify the test suite type manually]:test suite type= ' \ + '--reset[regenerate files if they already exist]' \ + '1:rockspec:__luarocks_rock' \ + '*:arg' +} + # arguments: # - must: rockpack file / external rock # - optional: version (only when chossing external rock) @@ -535,8 +569,9 @@ _luarocks_unpack(){ # arguments: # - must: rockspec file local upload_command_options=3D( - '--skip-pack[do not pack and send source rock]' - '--api-key=3D[give it an API key]:KEY:{_message "api key"}' + "--skip-pack[don't pack and send source rock]" + '(--temp-key)--api-key=3D[use and save specified API key]:api key' + '(--api-key)--temp-key=3D[use specified temporary API key in this invoc= ation only]:api key' '--force[replace existing rockspec if the same revision of a module alr= eady exists]' ) (( $+functions[_luarocks_upload] )) || @@ -545,26 +580,18 @@ _luarocks_upload(){ "${upload_command_options[@]}" \ '1: :{__luarocks_rock "rockspec"}' } -# arguments: -# - optional: name -# - optional: version -# - optional: URL / PATH -# receives as an argument a name and a version with optionally a URL/PATH -local write_rockspec_command_options=3D( - '--output=3D[write the rockspec with the given filename]:FILE:_files' - '--license=3D[specify a license string]:license (e.g. "MIT/X11" or "GNU= GPL v3")' - '--summary=3D[a short one-line description summary]:summary:{_message -= e "short summary of the rock"}' - '--detailed=3D[a longer description string]:detailed_text:{_message -e = "detailed description of the rock"}' - '--homepage=3D[project homepage]:URL:_urls' - '--lua-version=3D[supported Lua versions]:LUA_VER:__luarocks_lua_versio= ns' - '--rockspec-format=3D[rockspec format version, such as "1.0" or "1.1"]:= VER: ' - '--tag=3D[tag to use. Will attempt to extract version number from it]:t= ag:__git_tag' - '--lib=3D[comma separated list of C library files to link to]:library f= iles' -) + +(( $+functions[_luarocks_which] )) || +_luarocks_which(){ + _message -e modules 'module name' +} + (( $+functions[_luarocks_write_rockspec] )) || _luarocks_write_rockspec(){ _arguments -A "-*" \ - "${write_rockspec_command_options[@]}" \ + "${rockspec_options[@]}" \ + '--output=3D[write the rockspec with the given file]:file:_files' \ + '--tag=3D[specify tag to use. Will attempt to extract version number = from it]:tag:__git_tag' \ '1:: :{_message "new rock name"}' \ '2:: :{__luarocks_rock_version "new_rock"}' \ '3:: :_urls' @@ -572,13 +599,15 @@ _luarocks_write_rockspec(){ = # The real thing _arguments -C \ - '(--server --only-server)--server=3D[fetch rocks/rockspecs from this se= rver]:HOST:_hosts' \ - '(--server --only-server)--only-server=3D[fetch rocks/rockspecs from th= is server only]:HOST:_hosts' \ + '--dev[enable the sub-repositories in rocks servers]' \ + '(--server --only-server)--server=3D[fetch rocks/rockspecs from specifi= ed server]:host:_hosts' \ + '(--server --only-server)--only-server=3D[fetch rocks/rockspecs from sp= ecified server only]:host:_hosts' \ '--only-sources=3D[restrict downloads to paths matching the given URL]:= URL:_urls' \ - '--tree=3D[which tree to operate on]:TREE:{_files -/}' \ + '--lua-dir=3D[specify location of lua installation]:path:_directories' = \ + '--tree=3D[specify which tree to operate on]:tree:_directories' \ '--local[use the tree in the user'"'"'s home directory]' \ '--verbose[display verbose output of commands executed]' \ - '--timeout=3D[timeout on network operations]:SECONDS:{_message "timeout= (seconds)"}' \ + '--timeout=3D[specify timeout for network operations]:timeout (seconds)= ' \ '1: :__luarocks_command' \ '*::arg:->args' = diff --git a/Completion/Unix/Command/_mpc b/Completion/Unix/Command/_mpc index 4f200c69e..0f292ab4c 100644 --- a/Completion/Unix/Command/_mpc +++ b/Completion/Unix/Command/_mpc @@ -55,6 +55,7 @@ _mpc_command() { playlist:"print the current playlist" prev:"play the previous song in the current playlist" prio:"change song priorities in the queue" + queued:"show the next queued song" random:"toggle random mode, or specify state" repeat:"toggle repeat mode, or specify state" single:"toggle single mode, or specify state" @@ -69,6 +70,7 @@ _mpc_command() { findadd:"find songs and add them to the current playlist" list:"list all tags of given type" seek:"seek to the position specified in percent" + seekthrough:"seek by an amount of time within the song and playlist" shuffle:"shuffle the current playlist" stats:"display statistics about MPD" stop:"stop the currently playing playlists" @@ -82,6 +84,8 @@ _mpc_command() { waitmessage:"wait for at least one message on the specified channel" subscribe:"subscribe to the specified channel and continuously receiv= e messages" sticker:"sticker management" + mount:"list mounts or add a new mount" + unmount:"remove a mount" ) = if (( CURRENT =3D=3D 1 )); then @@ -209,7 +213,11 @@ _mpc_play() { } = _mpc_seek() { - _message "floating point percent value" + _message -e position 'position ([+-][HH:MM:SS]|<0-100>%%)' +} + +_mpc_seekthrough() { + _message -e position 'position ([+-][HH:MM:SS])' } = _mpc_enable() { @@ -349,6 +357,7 @@ _arguments -C \ '(-p --port)'{-p,--port=3D}'[connect to server port]:port' \ '(-f --format)'{-f,--format=3D}'[specify the format of song display]:fo= rmat string:->formats' \ '(-w --wait)'{-w,--wait}'[wait for operation to finish (e.g. database u= pdate)]' \ + '(-r --range)'{-r,--range=3D}'[operate on a range (e.g. when loading a = playlist)]:\:' \ '*::mpc command:_mpc_command' && ret=3D0 = if [[ $state =3D formats ]]; then diff --git a/Completion/Unix/Command/_samba b/Completion/Unix/Command/_sam= ba index 9a2fea9d6..775543794 100644 --- a/Completion/Unix/Command/_samba +++ b/Completion/Unix/Command/_samba @@ -55,6 +55,7 @@ case $service in '(-t --timeout)'{-t+,--timeout=3D}'[change the per-operation timeou= t]:timeout (seconds)' '(2 -p --port)'{-p+,--port=3D}'[specify tcp port]:tcp port' '(-g --grepable)'{-g,--grepable}'[produce grepable output]' + '(-q --quiet)'{-q,--quiet}'[suppress help message]' '(-B --browse)'{-B,--browse}'[browse SMB servers using DNS]' '(2 -d --debuglevel)'{-d+,--debuglevel=3D}'[specify debug level]:de= bug level:(0 1 2 3 4 5 6 7 8 9 10)' '(2 -O --socket-options)'{-O+,--socket-options=3D}'[specify socket = options]:socket options' diff --git a/Completion/Unix/Command/_script b/Completion/Unix/Command/_sc= ript index dfe57a796..d72a4ee62 100644 --- a/Completion/Unix/Command/_script +++ b/Completion/Unix/Command/_script @@ -24,6 +24,7 @@ case $OSTYPE in "(-e --return $hlp)"{-e,--return}'[return exit status of the child = process]' "(-f --flush $hlp)"{-f,--flush}'[flush output after each write]' "($hlp)--force[use output file even when it is a link]" + '(-o --output-limit)'{-o+,--output-limit=3D}'[terminate if output f= iles exceed specified size]:size (bytes)' "(-q --quiet $hlp)"{-q,--quiet}'[be quiet]' "(-t --timing $hlp)"{-t-,--timing=3D-}'[output timing data]::timing= file:_files' '(- 1)'{-h,--help}'[display help information]' diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh index 9c827d655..d1bd8f04b 100644 --- a/Completion/Unix/Command/_ssh +++ b/Completion/Unix/Command/_ssh @@ -56,7 +56,7 @@ _ssh () { '(-v)*-q[quiet operation]' \ '*-R+[specify remote port forwarding]:remote port forwarding:->forw= ard' \ '-S+[specify location of control socket for connection sharing]:pat= h to control socket:_files' \ - '-Q+[query parameters]:parameter type:((cipher\:"supported symmetri= c ciphers" cipher-auth\:"supported symmetric ciphers that support authenti= cated encryption" mac\:"supported message integrity codes" kex\:"key excha= nge algorithms" key\:"key types" protocol-version\:"supported SSH protocol= versions"))' \ + '-Q+[query parameters]:query option:((cipher\:"supported symmetric = ciphers" cipher-auth\:"supported symmetric ciphers that support authentica= ted encryption" mac\:"supported message integrity codes" kex\:"key exchang= e algorithms" key\:"key types" key-cert\:"certificate key types" key-plain= \:"non-certificate key types" protocol-version\:"supported SSH protocol ve= rsions" sig\:"supported signature algorithms" help\:"show supported querie= s"))' \ '-s[invoke subsystem]' \ '(-t)-T[disable pseudo-tty allocation]' \ '(-T)-t[force pseudo-tty allocation]' \ @@ -452,6 +452,7 @@ _ssh () { CanonicalizeHostname \ CanonicalizeMaxDots \ CanonicalizePermittedCNAMEs \ + CASignatureAlgorithms \ CertificateFile \ ChallengeResponseAuthentication \ CheckHostIP \ diff --git a/Completion/Unix/Command/_tmux b/Completion/Unix/Command/_tmux index ac459f8ab..4fb2c8ce2 100644 --- a/Completion/Unix/Command/_tmux +++ b/Completion/Unix/Command/_tmux @@ -303,7 +303,7 @@ _tmux-display-message() { _arguments -s -S \ '-c+[specify target client]:client:__tmux-clients' \ '-p[print message to stdout]' \ - '-t+[specify target client]:client:__tmux-clients' \ + '-t+[specify target pane]:pane:__tmux-panes' \ '-F+[specify output format]:format:__tmux-formats' \ ':message' } @@ -808,8 +808,9 @@ _tmux-set-window-option() { _tmux-set-hook() { [[ -n ${tmux_describe} ]] && print "set a hook to a command" && return _arguments -s \ - '-g[add hook to global list]' \ - '-u[unset a hook]' \ + '(-R)-g[add hook to global list]' \ + '(-g -u)-R[run hook immediately]' \ + '(-R)-u[unset a hook]' \ '-t+[specify target session]:session:__tmux-sessions' \ ':hook name:_tmux_hooks' \ '*:::command:=3D _tmux' @@ -1197,6 +1198,7 @@ __tmux-formats() { 'pane_tty:pseudo terminal of pane' 'pane_width:width of pane' 'pid:server PID' + 'rectangle_toggle:1 if rectangle selection is activated' 'scroll_region_lower:bottom of scroll region in pane' 'scroll_region_upper:top of scroll region in pane' 'scroll_position:scroll position in copy mode'