diff options
| author | Oliver Kiddle <opk@zsh.org> | 2026-05-14 22:13:01 +0200 |
|---|---|---|
| committer | Oliver Kiddle <opk@zsh.org> | 2026-05-14 22:13:01 +0200 |
| commit | 175e06494d28b1d55421c5f214c4d77790c7879b (patch) | |
| tree | a19247686076a8d0e825c74400041d100748b566 /Completion/Unix | |
| parent | 54526: update completions for FreeBSD 14.4 and 15.0 (diff) | |
| download | zsh-175e06494d28b1d55421c5f214c4d77790c7879b.tar zsh-175e06494d28b1d55421c5f214c4d77790c7879b.tar.gz zsh-175e06494d28b1d55421c5f214c4d77790c7879b.tar.bz2 zsh-175e06494d28b1d55421c5f214c4d77790c7879b.tar.lz zsh-175e06494d28b1d55421c5f214c4d77790c7879b.tar.xz zsh-175e06494d28b1d55421c5f214c4d77790c7879b.tar.zst zsh-175e06494d28b1d55421c5f214c4d77790c7879b.zip | |
54528: completion option updates and minor cleanups
Diffstat (limited to 'Completion/Unix')
| -rw-r--r-- | Completion/Unix/Command/_ansible | 3 | ||||
| -rw-r--r-- | Completion/Unix/Command/_attr | 4 | ||||
| -rw-r--r-- | Completion/Unix/Command/_diffstat | 1 | ||||
| -rw-r--r-- | Completion/Unix/Command/_dig | 8 | ||||
| -rw-r--r-- | Completion/Unix/Command/_entr | 1 | ||||
| -rw-r--r-- | Completion/Unix/Command/_git | 198 | ||||
| -rw-r--r-- | Completion/Unix/Command/_gphoto2 | 8 | ||||
| -rw-r--r-- | Completion/Unix/Command/_ip | 110 | ||||
| -rw-r--r-- | Completion/Unix/Command/_jq | 2 | ||||
| -rw-r--r-- | Completion/Unix/Command/_mtr | 3 | ||||
| -rw-r--r-- | Completion/Unix/Command/_pandoc | 26 | ||||
| -rw-r--r-- | Completion/Unix/Command/_pv | 6 | ||||
| -rw-r--r-- | Completion/Unix/Command/_sqlite | 1 |
13 files changed, 269 insertions, 102 deletions
diff --git a/Completion/Unix/Command/_ansible b/Completion/Unix/Command/_ansible index ab0cdee6c..c1db8de45 100644 --- a/Completion/Unix/Command/_ansible +++ b/Completion/Unix/Command/_ansible @@ -50,11 +50,12 @@ case $service in args+=( '(-J --ask-vault-pass --ask-vault-password)'{-J,--ask-vault-pass{,word}}'[ask for vault password]' \*{-e+,--extra-vars=}'[set additional variables]:key=value, YAML/JSON or @file:->extra-vars' + '--flush-cache[clear fact cache for every host in inventory]' '*--vault-id=[specify vault identity to use]:vault identity' --vault-pass{,word}-file='[specify vault password file]:vault password file:_files' \*{-i+,--inventory=}'[specify inventory host file or host list]: : _alternative "files\:inventory file\:_files" "hosts\:host\: _sequence _hosts"' - '!(-i --inventory)--inventory-file=:inventory file:_files' + '!*--inventory-file=:inventory file:_files' '(-l --limit --host --graph)'{-l+,--limit=}'[further limit hosts to an additional pattern]:host subset:->hosts' ) ;| diff --git a/Completion/Unix/Command/_attr b/Completion/Unix/Command/_attr index efa7c5c4f..58fd8837e 100644 --- a/Completion/Unix/Command/_attr +++ b/Completion/Unix/Command/_attr @@ -2,11 +2,9 @@ case $service in attr) - local -a list - [[ $OSTYPE = irix* ]] && - list=( '(-g -s -r -V)-l[list extended attributes associated with file]' ) _arguments -s -S "$list[@]" \ '(-l -r -s -V)-g[get extended attribute for file]:attribute name' \ + '(-g -s -r -V)-l[list extended attributes associated with file]' \ '(-l -g -s -q -V)-r[remove given attribute from file]:attribute name' \ '(-l -g -r)-s[set named attribute for file]:attribute name' \ '(-r)-q[quiet output]' \ diff --git a/Completion/Unix/Command/_diffstat b/Completion/Unix/Command/_diffstat index 9e7bf779b..068ec4c1e 100644 --- a/Completion/Unix/Command/_diffstat +++ b/Completion/Unix/Command/_diffstat @@ -17,6 +17,7 @@ _arguments -s -S \ '-n+[specify minimum width for filenames]:width [auto]' \ '-N+[specify maximum width for filenames]:width [auto]' \ '-o+[redirect standard output to specified file]:output file:_files' \ + '-O[inspect only files listed in diff for -S/-D options]' \ '-p+[specify number of path separators to strip]:path components [common]' \ '-q[suppress "0 files changed" message for empty diffs]' \ '-r+[specify rounding for histogram]:rounding:((0\:none 1\:simple 2\:simple+adjustment))' \ diff --git a/Completion/Unix/Command/_dig b/Completion/Unix/Command/_dig index 440c5de90..893f187d6 100644 --- a/Completion/Unix/Command/_dig +++ b/Completion/Unix/Command/_dig @@ -17,15 +17,16 @@ local -a alts args '*+'{no,}'badcookie[retry BADCOOKIE responses]' '*+'{no,}'cdflag[set the CD (checking disabled) bit in the query]' '*+'{no,}'class[display the CLASS whening printing the record]' + '*+'{no,}'coflag[set compact denial of existence ok flag in query]' '*+'{no,}'cookie[add a COOKIE option to the request]' '*+'{no,}'crypto[display cryptographic fields in DNSSEC records]' '*+'{no,}'dns64prefix[get the DNS64 prefixes from ipv4only.arpa]' - '*+edns=-[specify EDNS version for query]:version (0-255)' + '*+edns=-[specify EDNS version for query]:version (0-255) [0]' '*+noedns[clear EDNS version to be sent]' - '*+ednsflags=-[set EDNS flags bits]:flags' + '*+ednsflags=-[set undefined EDNS flags bits]:flags' '*+'{no,}'ednsnegotiation[set EDNS version negotiation]' '*+ednsopt=-[specify EDNS option]:code point' - '*+noedns[clear EDNS options to be sent]' + '*+noednsopt[clear EDNS options to be sent]' '*+'{no,}'expandaaaa[expand AAAA records]' '*+'{no,}'expire[send an EDNS Expire option]' '*+'{no,}'header-only[send query without a question section]' @@ -45,6 +46,7 @@ local -a alts args '*+'{no,}'cmd[print initial comment in output]' '*+'{no,}'short[print terse output]' '*+'{no,}'showbadcookie[show BADCOOKIE message]' + '*+'{no,}'showbadvers[show BADVERS message]' '*+'{no,}'identify[print IP and port of responder]' '*+'{no,}'comments[print comment lines in output]' '*+'{no,}'stats[print statistics]' diff --git a/Completion/Unix/Command/_entr b/Completion/Unix/Command/_entr index 438ab179a..4fb984af2 100644 --- a/Completion/Unix/Command/_entr +++ b/Completion/Unix/Command/_entr @@ -11,6 +11,7 @@ _arguments -s -S \ '-p[postpone first execution of the utility]' \ '(-a)-r[reload a persistent child process]' \ '(*)-s[evaluate the first argument using interpreter specified by $SHELL]' \ + '*-x[format custom exit status messages using a persistent awk(1) process]' \ '-z[exit after the utility completes]' \ '(-): :->command' \ '*::arguments:_normal' && ret=0 diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index e9f72799c..675170f6e 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -70,6 +70,7 @@ _git-add () { '(-f --force)'{-f,--force}'[allow adding otherwise ignored files]' \ '(-i --interactive : -)'{-i,--interactive}'[add contents interactively to index]' \ '(-p --patch)'{-p,--patch}'[like -i but go directly into patch mode for specified files]' \ + "--no-auto-advance[don't advance to next file when selecting hunks interactively]" \ '(-U --unified)'{-U+,--unified=}'[generate diff with given lines of context]:number of lines' \ '--inter-hunk-context=[combine patch hunks closer than specified number of lines]:number of lines' \ '(-e --edit)'{-e,--edit}'[open diff against index in editor]' \ @@ -515,6 +516,7 @@ _git-checkout () { "--ignore-other-worktrees[don't check if another worktree is using this branch]" \ '--recurse-submodules=-[control recursive updating of submodules]::checkout:__git_commits' \ '--no-overlay[remove files from index or working tree that are not in the tree-ish]' \ + "--no-auto-advance[don't advance to next file when selecting hunks interactively]" \ '(-q --quiet --progress)--no-progress[suppress progress reporting]' \ '--progress[force progress reporting]' \ '(*)--pathspec-from-file=[read pathspec from file]:file:_files' \ @@ -1011,6 +1013,7 @@ _git-format-patch () { '--from=[add From: header to email headers]: :_email_addresses' \ '*--add-header=[add an arbitrary header to email headers]:header' \ '--cover-letter[generate a cover letter template]' \ + '(--cover-letter)--commit-list-format=[format commit list in the cover letter]:format:(short-log modern)' \ '--notes=[append notes for the commit after the three-dash line]:: :__git_notes_refs' \ '( --no-signature --signature-file)--signature=[add a signature]:signature' \ '(--signature --signature-file)--no-signature[do not add a signature]' \ @@ -1219,6 +1222,49 @@ _git-gui () { return ret } +(( $+functions[_git-history] )) || +_git-history() { + local curcontext=$curcontext ret=1 + local -a state line common + declare -A opt_args + + _arguments -C \ + ': :->command' \ + '*:: :->option-or-argument' && ret=0 + + case $state in + (command) + declare -a commands + + commands=( + 'reword:rewrite commit message of specified commit' + 'split:interactively split up commit' + ) + + _describe -t commands command commands && ret=0 + ;; + (option-or-argument) + curcontext=${curcontext%:*}-$line[1]: + common=( + "--dry-run[don't update any references]" + '--update-refs=[control which references will be updates]:references [branches]:(branches head)' + ':commit:__git_commits' + ) + + case $line[1] in + reword) _arguments -S -s $endopt $common && ret=0 ;; + split) + _arguments -S -s $endopt $common \ + '*: :__git_ignore_line_inside_arguments __git_tree_files ${PREFIX:-.} ${(Q)line[1]}' && ret=0 + ;; + *) _default && ret=0 ;; + esac + ;; + esac + + return ret +} + (( $+functions[_git-init] )) || _git-init () { _arguments -S -s $endopt \ @@ -1300,7 +1346,8 @@ _git-log () { (( $+functions[_git-maintenance] )) || _git-maintenance() { - local curcontext="$curcontext" state state_descr line ret=1 + local curcontext="$curcontext" ret=1 + local -a state state_descr line args local -A opt_args _arguments -C \ @@ -1324,16 +1371,27 @@ _git-maintenance() { (option-or-argument) curcontext=${curcontext%:*}-$line[1]: case $line[1] in - (run) + run) _arguments -S $endopt \ '--auto[run tasks based on the state of the repository]' \ + '--detach[perform maintenance in the background]' \ '--schedule=[run tasks based on frequency]:frequency (seconds)' \ "--quiet[don't report progress or other information to stderr]" \ '*--task=[run a specific task]:task:(gc commit-graph prefetch loose-objects incremental-repack pack-refs)' && ret=0 ;; - (start) + start) _arguments \ - '--scheduler=:scheduler:(auto crontab systemd-timer launchctl schtasks)' + '--scheduler=:scheduler:(auto crontab systemd-timer launchctl schtasks)' && ret=0 + ;; + unregister) + args=( '(-f --force)'{-f,--force}'[return success even if repository was not registered]' ) + ;& + register) + _arguments -S $endopt $args \ + '--config-file=[use given config file]:config file:_files' && ret=0 + ;; + stop) _message 'no more arguments' ;; + *) _default && ret=0 ;; esac ;; esac @@ -1591,6 +1649,7 @@ _git-range-diff () { '(--right-only)--left-only[only emit output related to the first range]' \ '(--left-only)--right-only[only emit output related to the second range]' \ '(--remerge-diff)--diff-merges=[specify diff format to be used for merge commits]:format [m]:(off none 1 first-parent separate c combined cc dense-combined r remerge m on)' \ + '--max-memory=[specify maximum memory for cost matrix]:memory [4G]' \ '(--diff-merges -p --patch -u)--remerge-diff[produce remerge-diff output for merge commits]' \ $diff_options \ '1:range 1:__git_commit_ranges' \ @@ -1638,6 +1697,7 @@ _git-rebase () { "(--autostash --no-autostash)--no-autostash[don't stash uncommitted changes before rebasing and apply them afterwards]" \ '(--root)--fork-point[use merge-base --fork-point to refine upstream]' \ '--signoff[add Signed-off-by: trailer to the commit message]' \ + '(--force-rebase)*--trailer=[add custom trailer to every rebased commit]:trailer:__git_trailers_tokens' \ '--no-ff[cherry-pick all rebased commits with --interactive, otherwise synonymous to --force-rebase]' \ '(--keep-base)--onto=[start new branch with HEAD equal to given revision]:newbase:__git_revisions' \ "(--apply --whitespace -C)--reschedule-failed-exec[automatically re-schedule any 'exec' that fails]" \ @@ -1661,6 +1721,7 @@ _git-reset () { '(--soft --mixed --hard --merge -p --patch -U --unified --inter-hunk-context -- *)--keep[like --hard, but keep local working tree changes]' \ '--recurse-submodules=-[control recursive updating of submodules]::reset:__git_commits' \ '(-p --patch --soft --mixed -N --intent-to-add --hard --merge --keep)'{-p,--patch}'[select diff hunks to remove from the index]' \ + "--no-auto-advance[don't advance to next file when selecting hunks interactively]" \ '(-U --unified --soft --mixed -N --intent-to-add --hard --merge --keep)'{-U+,--unified=}'[generate diff with given lines of context]:number of lines' \ '(--soft --mixed -N --intent-to-add --hard --merge --keep)--inter-hunk-context=[combine patch hunks closer than specified number of lines]:number of lines' \ '(-N --intent-to-add --soft --mixed --hard --merge --keep -p --patch -U --unified --inter-hunk-context -- *)'{-N,--intent-to-add}'[record only the fact that removed paths will be added later]' \ @@ -1903,6 +1964,7 @@ _git-sparse-checkout() { reapply:'reapply the sparsity pattern rules to paths in the working tree' disable:'disable the config setting, and restore all files in the working directory' check-rules:'check whether sparsity rules match one or more paths' + clean:'remove files outside of the sparse-checkout definition' ) _describe -t commands command commands && ret=0 @@ -1910,7 +1972,7 @@ _git-sparse-checkout() { (option-or-argument) curcontext=${curcontext%:*}-$line[1]: case $line[1] in - init) + init|reapply) _arguments \ '--cone[allow for better performance with a limited set of patterns]' \ '--no-sparse-index[rewrite index to not be sparse]' && ret=0 @@ -1929,6 +1991,12 @@ _git-sparse-checkout() { '--cone[interpret rules file patterns as cone mode patterns]' \ '--rules-file=[use patterns in specified file]:file:_files' && ret=0 ;; + clean) + _arguments \ + '(-f --force)'{-f,--force}'[remove files]' \ + '--dry-run[list the directories that would be removed without deleting them]' \ + '--verbose[list every file considered for removal]' + ;; esac ;; esac @@ -2237,12 +2305,16 @@ _git-submodule () { _git-subtree () { local curcontext="$curcontext" state state_descr line ret=1 declare -A opt_args + local -a common=( + '(-q --quiet)'{-q,--quiet}'[suppress progress output]' + '(-d --debug)'{-d,--debug}'[show debug messages]' + '(-P --prefix)'{-P+,--prefix=}'[the path to the subtree in the repository to manipulate]: :_directories' + '(-S --gpg-sign --no-gpg-sign)'{-S-,--gpg-sign=-}'[GPG-sign the commit]::key id' + "(-S --gpg-sign --no-gpg-sign)--no-gpg-sign[don't GPG-sign the commit]" + ) # TODO: -P should only complete paths inside the current repository. - _arguments -C \ - '(-q --quiet)'{-q,--quiet}'[suppress progress output]' \ - '(-P --prefix)'{-P+,--prefix=}'[the path to the subtree in the repository to manipulate]: :_directories' \ - '(-d --debug)'{-d,--debug}'[show debug messages]' \ + _arguments -C $common \ ': :->command' \ '*::: := ->option-or-argument' && ret=0 @@ -2263,7 +2335,7 @@ _git-subtree () { curcontext=${curcontext%:*}-$line[1]: case $line[1] in (add) - _arguments \ + _arguments $common \ '(-q --quiet)'{-q,--quiet}'[suppress progress output]' \ '(-m --message)'{-m+,--message=}'[use the given message as the commit message for the merge commit]:message' \ '(-P --prefix)'{-P+,--prefix=}'[the path to the subtree in the repository to manipulate]: :_directories' \ @@ -2276,35 +2348,27 @@ _git-subtree () { # __git_ref_specs. ;; (merge) - _arguments -S \ - '(-q --quiet)'{-q,--quiet}'[suppress progress output]' \ - '(-P --prefix)'{-P+,--prefix=}'[the path to the subtree in the repository to manipulate]: :_directories' \ + _arguments -S $common \ '(-m --message)'{-m+,--message=}'[use the given message as the commit message for the merge commit]:message' \ '--squash[import only a single commit from the subproject]' \ ': :__git_references' && ret=0 ;; (pull) - _arguments -S \ - '(-q --quiet)'{-q,--quiet}'[suppress progress output]' \ - '(-P --prefix)'{-P+,--prefix=}'[the path to the subtree in the repository to manipulate]: :_directories' \ + _arguments -S $common \ '(-m --message)'{-m+,--message=}'[use the given message as the commit message for the merge commit]:message' \ '--squash[import only a single commit from the subproject]' \ ': :__git_any_repositories' \ ':: :__git_ref_specs' && ret=0 ;; (push) - _arguments -S \ - '(-q --quiet)'{-q,--quiet}'[suppress progress output]' \ - '(-P --prefix)'{-P+,--prefix=}'[the path to the subtree in the repository to manipulate]: :_directories' \ + _arguments -S $common \ '(-m --message)'{-m+,--message=}'[use the given message as the commit message for the merge commit]:message' \ ': :__git_any_repositories' \ ':: :__git_ref_specs' && ret=0 ;; (split) - _arguments -S \ + _arguments -S $common \ '--annotate[add a prefix to commit message of new commits]:prefix' \ - '(-q --quiet)'{-q,--quiet}'[suppress progress output]' \ - '(-P --prefix)'{-P+,--prefix=}'[specify path to the subtree in the repository to manipulate]: :_directories' \ '(-b --branch)'{-b,--branch=}'[create a new branch]' \ '--onto=[try connecting new tree to an existing one]: :__git_ref_specs' \ '(-m --message)'{-m+,--message=}'[specify commit message for the merge]:message' \ @@ -2472,12 +2536,12 @@ _git-worktree() { _arguments -s -S $endopt \ '(-n --dry-run)'{-n,--dry-run}"[don't remove, show only]" \ '(-v --verbose)'{-v,--verbose}'[report pruned objects]' \ - '--expire=[expire objects older than specified time]: :_git_approxidates' && ret=0 + '--expire=[prune missing working trees older than specified time]: :_git_approxidates' && ret=0 ;; (list) _arguments -S $endopt \ '(-v --verbose --porcelain -z)'{-v,--verbose}'[output additional information about worktrees]' \ - "--expire=[add 'prunable' annotation to worktrees older than specified time]: :_git_approxidates" \ + "--expire=[add 'prunable' annotation to missing worktrees older than specified time]: :_git_approxidates" \ '(-v)--porcelain[machine-readable output]' \ '(-v)-z[terminate each line with a NUL rather than a newline]' && ret=0 ;; @@ -2810,7 +2874,7 @@ __git_config_option-or-value () { 'diff.*.textconv:command to generate the text-converted version of a file::_cmdstring' 'diff.*.wordregex:regular expression that the diff driver should use to split words in a line:regular expression:->string' 'diff.*.xfuncname:regular expression that the diff driver should use to recognize the hunk header:regular expression:->string' - diff.algorithm:'default diff algorithm::->diff.algorithm:default' + diff.algorithm:"default diff algorithm::_git_diff_algorithms" diff.autorefreshindex:'run git update-index --refresh before git diff::->bool:true' diff.colorMoved:"color moved lines in diffs::__git_color_moved" diff.colorMovedWS:"ignore whitespace when detecting moved lines::__git_color_movedws" @@ -3689,14 +3753,6 @@ __git_config_option-or-value () { __git_guard_number 'number of days' fi ;; - (diff.algorithm) - __git_config_values -- "$current" "$parts[5]" \ - default:'basic greedy diff algorithm' \ - myers:'basic greedy diff algorithm' \ - minimal:'spend extra time to make sure the smallest possible diff is produced' \ - patience:'generate diffs with patience algorithm' \ - histogram:'generate diffs with histogram algorithm' && ret=0 - ;; (diff.renames) __git_config_booleans "$current" "$parts[5]" "$parts[2]" \ {copies,copy}:'try to detect both renames and copies' && ret=0 @@ -4072,6 +4128,7 @@ _git-reflog () { 'show:show log of ref' 'drop:remove reflog for specified references' 'exists:check whether a ref has a reflog' + 'write:write reflog entry for a reference' ) _alternative \ @@ -4114,7 +4171,10 @@ _git-reflog () { ;; (exists) __git_references && ret=0 - ;; + ;; + write) + _arguments ': :__git_references' ':old oid' ':new oid' ':message' && ret=0 + ;; esac esac @@ -4138,6 +4198,9 @@ _git-refs() { commands=( 'migrate:migrate ref store between different formats' 'verify:verify reference database consistency' + 'list:list references in the repository, alias for git-for-each-ref' + 'exists:check whether given reference exists' + 'optimize:optimize references to improve repository performance, alias for git-pack-refs' ) _describe -t commands command commands && ret=0 @@ -4157,6 +4220,9 @@ _git-refs() { '--strict[enable stricter error checking]' \ '--verbose[when verifying the reference database consistency, be chatty]' && ret=0 ;; + list) _git-for-each-ref && ret=0 ;; + exists) __git_references && ret=0 ;; + optimize) _git-pack-refs && ret=0 ;; *) _default && ret=0 ;; esac ;; @@ -4363,6 +4429,7 @@ _git-blame () { '(-n --show-number)'{-n,--show-number}'[show the line number in the original commit]' \ '-s[suppress author name and timestamp]' \ '-w[ignore whitespace when finding lines]' \ + '--diff-algorithm=[choose a diff algorithm to use when computing blame]: :_git_diff_algorithms' \ '--ignore-rev=[ignore specified revision when blaming]:revision:__git_revisions' \ '--ignore-revs-file=[ignore revisions from file]:file:_files' \ '(--color-by-age)--color-lines[color redundant metadata from previous line differently]' \ @@ -4841,10 +4908,14 @@ _git-send-email () { '--smtp-server-port=[specify port to connect to SMTP server on]:smtp port:_ports' \ '--smtp-server-option=[specify the outgoing SMTP server option to use]:SMTP server option' \ '--smtp-ssl-cert-path=[path to ca-certificates (directory or file)]:ca certificates path:_files' \ + '--smtp-ssl-client-cert=[path to client certificate file]: :_files' \ + '--smtp-ssl-client-key=[path to the private key file for the client certificate]: :_files' \ '--smtp-user=[specify user to use for SMTP-AUTH]:smtp user:_users' \ '(--no-smtp-auth)--smtp-auth=[specify allowed AUTH mechanisms]:space-separated list of mechanisms' \ '(--smtp-auth)--no-smtp-auth[disable SMTP authentication]' \ '--smtp-debug=[enable or disable debug output]:smtp debug:((0\:"disable" 1\:"enable"))' \ + '--imap-sent-folder=[IMAP folder where a copy of the emails should be sent]:IMAP folder' \ + '--use-imap-only[only copy emails instead of actually sending them]' \ '--batch-size=[specify maximum number of messages per connection]:number' \ '--relogin-delay=[specify delay between successive logins]:delay (seconds)' \ '--cc-cmd=[specify command to generate Cc\: header with]:Cc\: command:_cmdstring' \ @@ -5328,11 +5399,7 @@ _git-merge-file () { '( --theirs --union)--ours[resolve conflicts favoring our side of the lines]' \ '(--ours --union)--theirs[resolve conflicts favoring their side of the lines]' \ '(--ours --theirs )--union[resolve conflicts favoring both sides of the lines]' \ - '--diff-algorithm=[choose a diff algorithm]:diff algorithm:((default\:"basic greedy diff algorithm" - myers\:"basic greedy diff algorithm" - minimal\:"spend extra time to make sure the smallest possible diff is produced" - patience\:"generate diffs with patience algorithm" - histogram\:"generate diffs with histogram algorithm"))' \ + '--diff-algorithm=[choose a diff algorithm]: :_git_diff_algorithms' \ '--marker-size[specify length of conflict markers]: :__git_guard_number "marker length"' \ '--object-id[use object IDs instead of filenames]' \ '(--zdiff3)--diff3[show conflicts in "diff3" style]' \ @@ -5377,10 +5444,13 @@ _git-multi-pack-index() { _arguments \ '--object-dir=[specify location of git objects]:directory:_directories' \ '(--progress)--no-progress[turn progress off]' '!(--no-progress)--progress' \ + '--preferred-pack=[break ties in favor of specified pack]:pack' \ + '--bitmap[write a multi-pack bitmap]' \ '--stdin-packs[write a multi-pack index containing only pack index basenames provided on stdin]' \ '--refs-snapshot=[specify a file which contains a "refs snapshot" taken prior to repacking]:file:_files' \ + '--incremental[write an incremental MIDX file]' \ '--batch-size=[during repack, select packs so as to have pack files of at least the specified size]:size' \ - '1:verb:(write verify expire repack)' + '1:verb:(write compact verify expire repack)' } (( $+functions[_git-pack-objects] )) || @@ -5494,6 +5564,21 @@ _git-read-tree () { '3::third tree-ish to be read/merged:__git_tree_ishs' } +(( $+functions[_git-replay] )) || +_git-replay() { + _arguments -S $endopt \ + '(--advance --revert)--contained[update all branches that point to commits in given range]' \ + '(--advance --revert)--onto=[replay onto given commit]: :__git_revisions' \ + '(--onto --revert)--advance=[advance given branch]: :__git_branches' \ + '(--onto --advance)--revert=[revert commits onto given branch]: :__git_branches' \ + '--ref=[specify reference to update with result]: :__git_ref_specs' \ + '--ref-action=[control ref update behavior]:behavior:(( + update\:"update directly using atomic transaction" + print\:"output update-ref commands for pipeline use" + ))' \ + ':revision range:__git_commit_ranges' +} + (( $+functions[_git-symbolic-ref] )) || _git-symbolic-ref () { _arguments -S -s \ @@ -6280,7 +6365,10 @@ _git-hook() { _arguments $args \ '--ignore-missing[ignore any missing hook by quietly returning zero]' \ "--to-stdin=[specify file which will be redirected to hook's stdin]:file:_files" \ - '1:subcommand:(run)' \ + '--allow-unknown-hook-name' \ + '-z[terminate output lines with NUL instead of newlines]' \ + '--show-scope[prefix each hook name with a config scope]' \ + '1:subcommand:(run list)' \ '2:hook name:compadd $gitdir/hooks/*(x\:t)' } @@ -6523,6 +6611,7 @@ _git_commands () { gc:'cleanup unnecessary files and optimize local repository' grep:'print lines matching a pattern' gui:'run portable graphical interface to git' + history:'rewrite history' init:'create empty git repository or re-initialize an existing one' log:'show commit logs' maintenance:'run tasks to optimize Git repository data' @@ -6533,7 +6622,7 @@ _git_commands () { push:'update remote refs along with associated objects' range-diff:'compare two commit ranges' rebase:'forward-port local commits to the updated upstream head' - reset:'reset current HEAD to specified state' + reset:'reset HEAD or the index to a known state' restore:'restore working tree files' revert:'revert existing commits' rm:'remove files from the working tree and from the index' @@ -6545,7 +6634,7 @@ _git_commands () { submodule:'initialize, update, or inspect submodules' subtree:'split repository into subtrees and merge them' switch:'switch branches' - tag:'create, list, delete or verify tag object signed with GPG' + tag:'create, list, delete or verify tags' worktree:'manage multiple working dirs attached to the same repository' ) ancillary_manipulator_commands=( @@ -6606,6 +6695,7 @@ _git_commands () { pack-objects:'create packed archive of objects' prune-packed:'remove extra objects that are already in pack files' read-tree:'read tree information into directory index' + replay:'replay commits on a new base, works with bare repos too' symbolic-ref:'read and modify symbolic references' unpack-objects:'unpack objects from packed archive' update-index:'register file contents in the working directory to the index' @@ -6779,6 +6869,17 @@ __git_date_formats () { _describe -t date-formats 'date format' date_formats -- '( format\:custom\ format )' -S : } +(( $+functions[_git_diff_algorithms] )) || +_git_diff_algorithms() { + _describe -t diff-algorithms 'diff algorithm' '( + default\:"basic greedy diff algorithm" + myers\:"basic greedy diff algorithm" + minimal\:"spend extra time to produce smallest possible diff" + patience\:"generate diffs with patience algorithm" + histogram\:"generate diffs with histogram algorithm" + )' +} + (( $+functions[_git_diff_filters] )) || _git_diff_filters() { local sep @@ -6849,7 +6950,7 @@ _git_strategy_options() { renormalize no-renormalize \ 'find-renames::similarity threshold' \ subtree:path \ - 'diff-algorithm:algorithm:(patience minimal histogram myers)' + 'diff-algorithm:algorithm:_git_diff_algorithms' } (( $+functions[__git_encodings] )) || @@ -8172,11 +8273,7 @@ __git_setup_diff_options () { '(--minimal --patience --histogram --diff-algorithm)--patience[generate diffs with patience algorithm]' '(--minimal --patience --histogram --diff-algorithm)--histogram[generate diffs with histogram algorithm]' '(--minimal --patience --histogram --diff-algorithm)*--anchored=[generate diffs using the "anchored diff" algorithm]:text' - '(--minimal --patience --histogram --diff-algorithm)--diff-algorithm=[choose a diff algorithm]:diff algorithm:((default\:"basic greedy diff algorithm" - myers\:"basic greedy diff algorithm" - minimal\:"spend extra time to make sure the smallest possible diff is produced" - patience\:"generate diffs with patience algorithm" - histogram\:"generate diffs with histogram algorithm"))' + '(--minimal --patience --histogram --diff-algorithm)--diff-algorithm=[choose a diff algorithm]: :_git_diff_algorithms' \ '--stat=-[generate diffstat instead of patch]:: :__git_guard_diff-stat-width' '--stat-width=-[generate diffstat with a given width]:width' '--stat-graph-width=-[generate diffstat with a given graph width]:width' @@ -8208,6 +8305,7 @@ __git_setup_diff_options () { "(--color-moved-ws)--no-color-moved-ws=[don't ignore whitespace when performing move detection]" "--ita-invisible-in-index[hide 'git add -N' entries from the index]" "!(--ita-invisible-in-index)--ita-visible-in-index" + '--max-depth=[specify maximum tree depth to recurse]:depth' '--no-renames[turn off rename detection]' $exclusive_diff_options'--check[warn if changes introduce trailing whitespace or space/tab indents]' '--full-index[show full object name of pre- and post-image blob]' @@ -8225,7 +8323,7 @@ __git_setup_diff_options () { '--diff-filter=-[select certain kinds of files for diff]: :_git_diff_filters' '-S-[look for differences that add or remove the given string]:string' '-G-[look for differences whose added or removed line matches the given regex]:pattern' - '--pickaxe-all[when -S finds a change, show all changes in that changeset]' + '--pickaxe-all[when -G or -S find a change, show all changes in that changeset]' '--pickaxe-regex[treat argument of -S as regular expression]' '-O-[output patch in the order of glob-pattern lines in given file]: :_files' '--rotate-to=[show the change in specified path first]:path:_directories' diff --git a/Completion/Unix/Command/_gphoto2 b/Completion/Unix/Command/_gphoto2 index 788c9702f..df17aa111 100644 --- a/Completion/Unix/Command/_gphoto2 +++ b/Completion/Unix/Command/_gphoto2 @@ -11,6 +11,7 @@ _arguments -s -C \ '--debug-loglevel=[set debug level]:debug level:(error debug data all)' \ '--debug-logfile=[name of file to write debug info to]:file:_files' \ '(-q --quiet)'{-q,--quiet}'[quiet output]' \ + '(-q --quiet)--parsable[simple parsable output]' \ '--hook-script=[hook script to call after downloads, captures, etc.]:file:_files' \ '--stdout[send file to stdout]' \ '--stdout-size[print filesize before data]' \ @@ -41,8 +42,8 @@ _arguments -s -C \ '--keep[keep images on camera after capturing]' \ '--keep-raw[keep the RAW images on the camera with --capture-image-and-download]' \ '--no-keep[remove images from camera after capturing]' \ - '--wait-event=-[wait for event from camera]::count' \ - '--wait-event-and-download=-[wait for event from camera and download new images]::count' \ + '--wait-event=-[wait for event from camera]:: :_numbers -u events -d forever wait\ time s\:seconds ms\:milliseconds' \ + '--wait-event-and-download=-[wait for event from camera and download new images]:: :_numbers -u events -d forever wait\ time s\:seconds ms\:milliseconds' \ '--capture-preview[capture a quick preview]' \ '--show-preview[capture a quick preview and display using ASCII art]' \ '(-B --bulb)'{-B,--bulb=}'[set bulb exposure time]:exposure time (seconds)' \ @@ -54,7 +55,7 @@ _arguments -s -C \ '--capture-image-and-download[capture an image and download it]' \ '--capture-movie=-[capture a movie]:count or seconds' \ '--capture-sound[capture an audio clip]' \ - '--capture-tethered=-[wait for shutter release on the camera and download]::count' \ + '--capture-tethered=-[wait for shutter release on the camera and download]:: :_numbers -u events wait\ time s\:seconds ms\:milliseconds' \ '(-l --list-folders)'{-l,--list-folders}'[list folders in folder]' \ '(-L --list-files)'{-L,--list-files}'[list files in folder]' \ '(-m --mkdir)'{-m,--mkdir=}'[create a directory]:directory' \ @@ -75,6 +76,7 @@ _arguments -s -C \ '(-D --delete-all-files)'{-D,--delete-all-files}'[delete all files in folder]' \ '(-u --upload-file)'{-u,--upload-file=}'[upload a file to camera]:file:_files' \ '--filename=[specify pattern to save file as]:pattern:_date_formats' \ + '--filenumber=[specify the number %n in the filename pattern starts at]:starting number [1]' \ '(-f --folder)'{-f,--folder=}'[specify camera folder]:folder [/]' \ '(-R --recurse --no-recurse)'{-R,--recurse}'[recursion (default for download)]' \ '(-R --recurse)--no-recurse[no recursion (default for deletion)]' \ diff --git a/Completion/Unix/Command/_ip b/Completion/Unix/Command/_ip index 0dde5e5f0..2d6774768 100644 --- a/Completion/Unix/Command/_ip +++ b/Completion/Unix/Command/_ip @@ -21,12 +21,12 @@ local -a subcmd_string subcmd_string=(/$'[^\0]#\0'/ ':string:arbitrary string:( )') local -a subcmd_number -subcmd_number=(/$'[0-9]##\0'/ ':number:decimal number:( )') +subcmd_number=(/$'[0-9]##\0'/ ': _message -e numbers "decimal number"') local xp='[[:xdigit:]][[:xdigit:]]' local -a subcmd_lladdr subcmd_lladdr=(/"${xp}:${xp}:${xp}:${xp}:${xp}:${xp}"$'\0'/ -':lladdress:link layer (MAC) address:( )') + ': _message -e lladdresses "link layer (MAC) address"') local -a subcmd_ipaddr subcmd_ipaddr=( @@ -57,7 +57,7 @@ _regex_words scope "IP address scope" \ subcmd_scope=("$reply[@]") local -a subcmd_nud -_regex_words nud "Neighbour Unreachability Detection state" \ +_regex_words nud "neighbour unreachability detection state" \ 'permanent:valid forever' \ 'noarp:valid, not validated, removed if expired' \ 'reachable:valid until reachability timeout' \ @@ -65,7 +65,7 @@ _regex_words nud "Neighbour Unreachability Detection state" \ subcmd_nud=("$reply[@]") local -a subcmd_rttype -_regex_words route-type "Route type" \ +_regex_words route-type "route type" \ 'unicast:real point-to-point route' \ 'unreachable:generate Host Unreachable messages' \ 'blackhole:silently discard' \ @@ -85,12 +85,12 @@ local -a subcmd_route subcmd_route=("(" $subcmd_rttype "|" ")" $subcmd_ipaddr) local -a subcmd_tos -_regex_words tos "type of service" \ +_regex_words tos "service type" \ 'lowdelay:low latency' \ 'throughput:high bulk throughput' \ 'reliability:high reliability' subcmd_tos=("(" "$reply[@]" "|" - /$'(|0x)[[:xdigit:]]##\0'/ ":hex-number:8-bit hex number:( )" ")") + /$'(|0x)[[:xdigit:]]##\0'/ ":hex-numbers:8-bit hex number:( )" ")") local -a subcmd_lockmtu subcmd_lockmtu=("(" /$'lock\0'/ ":lock:lock:(lock)" "|" ")" $subcmd_number ) @@ -123,7 +123,7 @@ local -a subcmd_rtrealm subcmd_rtrealms _regex_words -t / rtrealm 'routing realm' \ 'cosmos:everywhere' subcmd_rtrealms=("(" "$reply[@]" "|" /$'[0-9]##/'/ - ':number:decimal number:( )' ")") + ':numbers:decimal number:( )' ")") _regex_words rtrealm 'routing realm' \ 'cosmos:everywhere' @@ -160,22 +160,46 @@ _regex_words tunnelmode 'tunnel mode' \ 'gre:Generic Route Encapsulation - IPv4/IPv6 in IPv4 tunnel' subcmd_tunnelmode=("$reply[@]") -local -a subcmd_files -subcmd_files=(/$'[^\0]##\0'/ ':file:file name:_files') +local -a subcmd_linktype +subcmd_linktype=(/$'[^\0]##\0'/ ':link-types:link type:(bridge bond dummy hsr ifb ipoib macvlan macvtap vcan veth vlan vxlan ip6tnl ipip sit gre gretap ip6gre ip6gretap vti nlmon ipvlan lowpan geneve macsec vrf)') +local -a subcmd_files +subcmd_files=(/$'[^\0]##\0'/ ':files:file:_files') # # The ip top-level commands. First link # + +local -a link_common_cmds +link_common_cmds=( + 'txq*ueuelen:specify length of transmit queue:$subcmd_number' \ + 'ad*dress:specify unicast link layer (MAC) address:$subcmd_lladdr' \ + 'br*oadcast:specify broadcast link layer (MAC) address:$subcmd_lladdr' \ + 'm*tu:specify maximum transmit unit:$subcmd_number' +) +local -a link_add_cmds +_regex_words \ + link-add-commands 'link add command' $link_common_cmds \ + 'link:specify device:$subcmd_dev' \ + 'name:specify name' \ + 'type:specify type:$subcmd_linktype' \ + 'numtxqueues:specify number of transmit queues:$subcmd_number' \ + 'numrxqueues:specify number of receive queues:$subcmd_number' \ + 'index:specify desired index' \ + 'group:multicast IP address to join:$subcmd_lladdr' +link_add_cmds=( "$reply[@]" "#" ) + local -a link_set_cmds _regex_words \ - link-set-commands 'link set commands' \ + link-set-commands 'link set command' \ 'dev:specify device:$subcmd_dev' \ 'u*p:change state to up' \ 'do*wn:change state to down' \ 'ar*p:change ARP flag on device:$subcmd_onoff' \ 'mu*lticast:change MULTICAST flag on device:$subcmd_onoff' \ + 'allmulticast:change allmulticast flag on device:$subcmd_onoff' \ 'pr*omisc:set promiscuous mode:$subcmd_onoff' \ + 'protodown:change the PROTODOWN state on the device:$subcmd_onoff' \ 'dy*namic:change DYNAMIC flag on device:$subcmd_onoff' \ 'n*ame:change name of device:$subcmd_string' \ 'txq*ueuelen:specify length of transmit queue:$subcmd_number' \ @@ -189,7 +213,7 @@ _regex_words \ link_set_cmds=("(" $subcmd_dev "|" ")" "$reply[@]" "#" ) local -a link_show_cmds -_regex_words link-show-commands 'link show commands' \ +_regex_words link-show-commands 'link show command' \ 'dev:specify device:$subcmd_dev' \ 'up:limit display to running devices' link_show_cmds=("(" $subcmd_dev "|" ")" "$reply[@]" "#" ) @@ -197,15 +221,16 @@ link_show_cmds=("(" $subcmd_dev "|" ")" "$reply[@]" "#" ) local -a link_cmds _regex_words \ link-commands "link command" \ + 'a*dd:add virtual link:$link_add_cmds' \ 'h*elp:show help for command' \ 'se*t:change device attributes:$link_set_cmds' \ 'sh*ow:display device attributes:$link_show_cmds' link_cmds=("$reply[@]") - # # addr # + local -a addr_add_cmds # TODO: broadcast can take + or = _regex_words addr-add-commands "addr add/remove/change/replace commands" \ @@ -214,7 +239,12 @@ _regex_words addr-add-commands "addr add/remove/change/replace commands" \ 'p*eer:specify peer IP address (point-to-point):$subcmd_ipaddr' \ 'b*roadcast:specify broadcast IP address:$subcmd_ipaddr' \ 'la*bel:specify tag for device:$subcmd_string' \ - 's*cope:specify scope for address:$subcmd_scope' + 's*cope:specify scope for address:$subcmd_scope' \ + 'valid_lft:specify valid lifetime of this address' \ + 'preferred_lft:specify valid lifetime of this address' \ + 'home:designate this address as the "home address" (IPv6)' \ + 'mngtmpaddr:manage temporary addresses created from this one as template on behalf of Privacy Extensions' + # can complete IP address with no keyword addr_add_cmds=("(" $subcmd_ipaddr "|" ")" "$reply[@]" "#" ) @@ -282,6 +312,7 @@ addrlabel_cmds=("$reply[@]") # # neigh # + local -a neigh_add_cmds _regex_words neigh-add-commands "neighbour add command" \ 't*o:add new neighbour IP address:$subcmd_ipaddr' \ @@ -321,6 +352,7 @@ neigh_cmds=("$reply[@]") # # route # + local -a route_add_cmds _regex_words route-add-commands "route add/change/replace command" \ 'to:route destination prefix:$subcmd_route' \ @@ -393,10 +425,10 @@ _regex_words \ 'g*et:get a single network route:$route_get_cmds' route_cmds=("$reply[@]") - # # rule # + local -a rule_add_cmds _regex_words rule-add-commands 'ip rule add/delete commands' \ 'ty*xpe:type of rule:$subcmd_ruletypes' \ @@ -423,10 +455,10 @@ _regex_words \ 's*how:list routing rules' rule_cmds=("$reply[@]") - # # tunnel # + local -a tunnel_add_cmds _regex_words tunnel-add-commands 'tunnel add/change/delete commands' \ 'na*me:select tunnel device name:$subcmd_dev' \ @@ -461,10 +493,10 @@ _regex_words \ 's*how:list IP tunnels' tunnel_cmds=("$reply[@]") - # # maddr # + local -a maddr_add_cmds _regex_words maddr-add-commands "maddr add/delete command" \ 'a*ddress:select link layer (MAC) address:$subcmd_lladdr' \ @@ -486,10 +518,10 @@ _regex_words \ 's*how:list multicast addresses:$maddr_show_cmds' maddr_cmds=("$reply[@]") - # # mroute # + local -a mroute_show_cmds _regex_words mroute-show-commands "mroute show command" \ 'to:select destination prefix:$subcmd_ipaddr' \ @@ -504,10 +536,10 @@ _regex_words \ 's*how:list multicast routing cache entries:$mroute_show_cmds' mroute_cmds=("$reply[@]") - # # monitor # + local -a monitor_cmds _regex_words \ monitor-commands "monitor command" \ @@ -519,7 +551,6 @@ _regex_words \ 'file:read rtmon-generated log:$subcmd_files' monitor_cmds=("$reply[@]") - # # Global argument handling # @@ -531,20 +562,18 @@ args=( /$'[^\0]#\0'/ ) -# TODO: -# -b*atch <FILENAME> -# -force (for batch mode) -# -l*oops <COUNT> -# -n*etns <NETNS> -# -rc, -rcvbuf<SIZE> -_regex_words options "ip options" \ - '-h*uman:output statistics with human readable values' \ +_regex_words options "ip option" \ + '-V*ersion:display version information' \ + '-h*uman-readable:output statistics with human readable values' \ + '-b*atch:read commands from specified file:$subcmd_files' \ + '-force:do not terminate on errors in batch mode' \ '-i*ec:print human readable rates in IEC units (ie. 1K = 1024)' \ '-s*tatistics:output statistics' \ '-d*etails:output more detailed information' \ '-c*olor:color output' \ '-br*ief:brief output' \ '-a*ll:executes specified command over all objects' \ + '-l*oops:specify maximum loops ip address flush logic will attempt:$subcmd_number' \ '-f*amily:select protocol family:$subcmd_family' \ '-4:IPv4' \ '-6:IPv6' \ @@ -556,9 +585,17 @@ _regex_words options "ip options" \ '-o*neline:output one record per line' \ '-j*son:output results in JSON' \ '-p*retty:pretty print JSON' \ + '-r*esolve:use system resolver for DNS names' \ + '-n*etns:switch to specified network namespace:$subcmd_string' \ + '-N*umeric:print numbers instead of converting to text forms' \ + '-a*ll:execute specified command over all objects' \ + '-c*olor:use color output' \ '-t*imestamp:display current time when using monitor option' \ - '-ts*hort:display current time in shorter format when using monitor option' \ - '-r*esolve:use system resolver for DNS names' + '-ts*hort:like -timestamp, but use shorter format' \ + '-rc*vbuf:set the netlink socket receive buffer size:$subcmd_number' \ + '-iec:print human readable rates in IEC units' \ + '-j*son:output results in JSON format' \ + '-echo:request the kernel to send applied changes back' args+=("$reply[@]" "#") _regex_words \ @@ -569,10 +606,23 @@ _regex_words \ 'r*oute:manage routing table:$route_cmds' \ 'ru*le:manage routing policy database:$rule_cmds' \ 'n*eigh:manage neighbour/ARP tables:$neigh_cmds' \ + 'nt*able:manage the neighbor cache operation' \ 't*unnel:configure tunnel:$tunnel_cmds' \ + 'net*ns:manage network namespaces' \ + 'l2*tp:tunnel ethernet over IP (L2TPv3)' \ + 'f*ou:UDP receive port configuration' \ + 'mac*sec:MACsec device configuration' \ + 'tcp_metrics:manage TCP metrics' \ + 'token:manage tokenized interface identifiers' \ + 'netc*onf:network configuration monitoring' \ + ila ioam mptcp nexthop vrf sr stats \ 'm*addr:manage multicast addresses:$maddr_cmds' \ 'mr*oute:manage multicast routing cache:$mroute_cmds' \ - 'mo*nitor:monitor state:$monitor_cmds' + 'mru*le:multicast routing policy database' \ + 'mo*nitor:monitor state:$monitor_cmds' \ + 'tunt*ap:manage TUN/TAP devices' \ + 'x*frm:manage IPSec policies' \ + 'help' args+=("$reply[@]") _regex_arguments _ip "${args[@]}" diff --git a/Completion/Unix/Command/_jq b/Completion/Unix/Command/_jq index e8e6b0913..fb44702b2 100644 --- a/Completion/Unix/Command/_jq +++ b/Completion/Unix/Command/_jq @@ -30,7 +30,7 @@ _arguments -S -s : \ '(-r --raw-output -j --join-output)--raw-output0[like -r, with NUL after each output]' \ '(-r --raw-output --raw-output0 -j --join-output)'{-j,--join-output}"[like -r, without newlines between outputs]" \ '(-f --from-file)'{-f,--from-file}'[read filter from file]: :_files' \ - '-L+[prepend a directory to the module search path]:_directories' \ + \*{-L+,--library-path}'[prepend a directory to the module search path]:_directories' \ '(-e --exit-status)'{-e,--exit-status}'[report "false" and "null" results via exit code]' \ '*--arg[pre-set a variable to a string]:variable name: :value (string)' \ '*--argjson[pre-set a variable to an object]:variable name: :value (JSON)' \ diff --git a/Completion/Unix/Command/_mtr b/Completion/Unix/Command/_mtr index 9a73cfbd4..c5f7ea129 100644 --- a/Completion/Unix/Command/_mtr +++ b/Completion/Unix/Command/_mtr @@ -9,6 +9,7 @@ _arguments -s -S \ '(H -f --first-ttl)'{-f+,--first-ttl=}'[specify TTL to start]:TTL [1]' \ '(H -m --max-ttl)'{-m+,--max-ttl=}'[specify maximum number of hops to probe]:hops [30]' \ '(H -U --max-unknown)'{-U+,--max-unknown=}'[specify maximum unknown hosts]:maximum [5]' \ + '(H -E --max-display-path)'{-E+,--max-display-path=}'[specify maximum number of ECMP paths to display]:ECMP paths [8]' \ '(H -P --port)'{-P+,--port=}'[specify target port for TCP, SCTP or UDP]:port' \ '(H -L --localport -T --tcp -S --sctp)'{-L+,--localport=}'[specify source port number for UDP]' \ '(H -s --psize 2)'{-s+,--psize=}'[packet size]:packet size (bytes)' \ @@ -41,6 +42,8 @@ _arguments -s -S \ "I[interarrival jitter]"' \ '(H -z --aslookup -y --ipinfo)'{-y+,--ipinfo=}'[select IP information in output]:information:((0\:display\ AS\ number 1\:display\ IP\ prefix 2\:display\ country\ code 3\:display\ RIR 4\:display\ allocation\ date))' \ '(H -y --ipinfo -z --aslookup)'{-z,--aslookup}'[display AS number]' \ + '(H)--ipinfo_provider4=[specify provider for IPv4 AS lookups]:domain [origin.asn.cymru.com]' \ + '(H)--ipinfo_provider6=[specify provider for IPv6 AS lookups]:domain [origin6.asn.cymru.com]' \ '(H)1:destination host:_hosts' \ '(H)2:packet size (bytes)' \ + '(H)' \ diff --git a/Completion/Unix/Command/_pandoc b/Completion/Unix/Command/_pandoc index 797e73eaa..243b1ac8b 100644 --- a/Completion/Unix/Command/_pandoc +++ b/Completion/Unix/Command/_pandoc @@ -9,10 +9,10 @@ _pandoc_format() { local format=${PREFIX%%(+|-)*} if compset -P '*(+|-)'; then local pm=${IPREFIX[-1]} # '+' or '-' - local -a extensions=(${${$(pandoc --list-extensions=$format):#$pm*}#(+|-)}) + local -a extensions=( ${${$(_call_program extensions pandoc --list-extensions=$format):#$pm*}#(+|-)} ) _wanted extensions expl 'extension' compadd -S '+' -r '-+ ' -a extensions else - local -a formats=( $(pandoc --list-$inout[2]-formats) ) + local -a formats=( $(_call_program formats pandoc --list-$inout[2]-formats) ) _wanted formats expl 'format' compadd -S '+' -r '-+ ' -a formats fi } @@ -22,15 +22,19 @@ _pandoc_format() { _pandoc_all_formats(){ local -a expl local -aU formats - formats=( $(pandoc --list-input-formats) $(pandoc --list-output-formats) ) - _wanted formats expl 'format' compadd -a formats + formats=( + $(_call_program input-formats pandoc --list-input-formats) + $(_call_program output-formats pandoc --list-output-formats) + ) + _description formats expl 'format' + compadd "$expl[@]" "$@" -a formats } # pdf engine choice (( $+functions[_pandoc_pdf_engine] )) || _pandoc_pdf_engine(){ _alternative \ - 'engines:engine:(pdflatex lualatex xelatex latexmk tectonic wkhtmltopdf weasyprint prince context pdfroff)' \ + 'engines:engine:(pdflatex lualatex xelatex latexmk tectonic wkhtmltopdf weasyprint pagedjs-cli prince context groff pdfroff typst)' \ 'engine-executables:engine executable:_files -g "*(#q*)"' } @@ -43,7 +47,7 @@ _pandoc_pdf_engine_opts(){ _tex ;; *) - _message "Options for ${pdf_engine}" + _message "option for ${pdf_engine}" ;; esac } @@ -79,7 +83,7 @@ _pandoc_template(){ (( $+functions[_pandoc_highlight_style] )) || _pandoc_highlight_style(){ _alternative \ - 'styles:style:( $(pandoc --list-highlight-styles) )' \ + 'styles:style:( $(_call_program styles pandoc --list-highlight-styles) )' \ 'style-files:style file:_files -g "*.theme(-.)"' } @@ -195,7 +199,8 @@ _arguments -s \ '--abbreviations=[specify a custom abbreviations file]:file:_files ' \ {-s,--standalone}'[produce output with an appropriate header and footer]' \ '--template=[use specified file as a custom template for the generated document. Implies --standalone]: :_pandoc_template' \ - {\*-V+,\*--variable=}'[set the variable KEY to the value VALUE]:key\:value: ' \ + {\*-V+,\*--variable=}'[set a template variable]:key\:value' \ + \*--variable-json='[set a template variable to the value specified by a JSON string]:key\:json' \ '(- :)'{-D+,--print-default-template=}'[print the system default template for an output]:format:( $(pandoc --list-output-formats) )' \ '(- :)--print-default-data-file=[print a system default data file]:file: ' \ '--eol=[manually specify line endings (crlf|lf|native)]: :_pandoc_eol' \ @@ -217,6 +222,7 @@ _arguments -s \ '--no-check-certificate[disable the certificate verification]' \ '--self-contained[produce a standalone HTML file with no external dependencies, using data: URIs to incorporate the contents of linked scripts, stylesheets, images, and videos. Implies --standalone]' \ '--embed-resources=-[produce a standalone HTML document with no external dependencies]::enable:(true false)' \ + '--link-images=-[include links to images instead of embedding the images in ODT]::enable:(true false)' \ '--html-q-tags[use <q> tags for quotes in HTML]' \ '--ascii[use only ASCII characters in output, supported only for HTML and DocBook output]' \ '--reference-links[use reference-style links, rather than inline links]' \ @@ -224,7 +230,9 @@ _arguments -s \ '--markdown-headings[specify style for level1 and 2 headings in markdown output]:style [atx]:(setext atx)' \ '--list-tables=-[render tables as list tables in RST output]::enable(true false)' \ '--top-level-division=[treat top-level headers as given division type in LaTeX, ConTeXt, DocBook and TEI output]:top level division:(default section chapter part)' \ - {-N,--number-sections}'[number section headings in LaTeX, ConTeXt, HTML, or EPUB output]' \ + '(--lof --list-of-figures)'{--lof=-,--list-of-figures=-}'[include an automatically generated list of figures]::enable:(true false)' \ + '(--lot --list-of-tables)'{--lot=-,--list-of-tables=-}'[include an automatically generated list of tables]::enable:(true false)' \ + '(-N --number-sections)'{-N-,--number-sections=-}'[number section headings in LaTeX, ConTeXt, HTML, or EPUB output]::enable:(true false)' \ '--number-offset=[specify offset for section headings in HTML output (ignored in other output formats)]:number[number,...] [0]' \ '--listings[use the listings package for LaTeX code blocks]' \ {-i,--incremental}'[make list items in slide shows display incrementally (one by one)]' \ diff --git a/Completion/Unix/Command/_pv b/Completion/Unix/Command/_pv index 0e1f148d5..4bec330a6 100644 --- a/Completion/Unix/Command/_pv +++ b/Completion/Unix/Command/_pv @@ -17,7 +17,6 @@ _arguments -s -S $args \ '(-I --fineta -F --format)'{-I,--fineta}'[show absolute estimated time of arrival]' \ '(-r --rate -F --format)'{-r,--rate}'[show data transfer rate counter]' \ '(-a --average-rate -F --format)'{-a,--average-rate}'[show data transfer average rate counter]' \ - '(-m --average-rate-window)'{-m+,--average-rate-window=}'[compute average rate over period]:duration (seconds) [30]' \ '(-b --bytes -8 --bits -F --format)'{-b,--bytes}'[show number of bytes transferred]' \ '(-8 --bits -b --bytes -F --format)'{-8,--bits}'[show number of bits transferred]' \ '(-k --si)'{-k,--si}'[treat suffixes as multiples of 1000 rather than 1024]' \ @@ -33,10 +32,11 @@ _arguments -s -S $args \ '(-l --line-mode -R --remote)'{-l,--line-mode}'[count lines instead of bytes]' \ '(-0 --null -l --line-mode)'{-0,--null}'[lines are null-terminated]' \ '(-i --interval)'{-i+,--interval=}'[update every after specified interval]:interval (seconds) [1]' \ - '(-m --average-rate-window)'{-m,--average-rate-window}'[compute average rate over past period]:period (seconds) [30]' \ + '(-m --average-rate-window)'{-m,--average-rate-window}'[compute average rate over period]:period (seconds) [30]' \ '(-w --width)'{-w+,--width}'[assume terminal is specified characters wide]:width' \ '(-H --height)'{-H+,--height=}'[assume terminal is specified rows high]:height' \ '(-N --name)'{-N+,--name=}'[prefix visual information with given name]:name' \ + '(-u --bar-style)'{-u+,--bar-style=}'[set default bar style]:name [plain]:(plain block granular shaded)' \ '(-x --extra-display)'{-x+,--extra-display=}'[also send progress to destination]:destination:_sequence - compadd windowtitle processtitle' \ '(-v --stats)'{-v,--stats}'[output transfer statistics at the end]' \ '(-f --force -R --remote)'{-f,--force}'[output even if standard error is not a terminal]' \ @@ -70,6 +70,8 @@ case $state in 'a:average data transfer rate' 'b:bytes transferred so far' 'T:percentage of transfer buffer in use' + 'A:last written' + 'L:previous line' 'N:name prefix' '%:literal %' ) diff --git a/Completion/Unix/Command/_sqlite b/Completion/Unix/Command/_sqlite index a83624083..218b92b4a 100644 --- a/Completion/Unix/Command/_sqlite +++ b/Completion/Unix/Command/_sqlite @@ -47,6 +47,7 @@ options+=( $^dashes'-bail[stop after hitting an error]' $^dashes'-cmd[run specified command before reading stdin]:sqlite meta-command' $^dashes'-deserialize[open the database using sqlite3_deserialize()]' + $^dashes'-escape[set rendering of control characters in output]:escape [ascii]:(symbol ascii off)' '(-*batch -*interactive)'$^dashes'-batch[force batch I/O]' '(-*batch -*interactive)'$^dashes'-interactive[force interactive I/O]' $^dashes'-lookaside[specify size and number of entries for lookaside memory]:size (bytes): :entries' |
