Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: completion option updates



There's a few more options updated affecting completion functions.
Versions are:

ethtool 4.16
htop 2.2.0
pidof (procps-ng) 3.3.13
git 2.17
GNU sed 4.5
sqlite 3.23.1
ssh 7.7 - I said before that there was no changes but on closer
inspection, there are a couple.

Oliver

diff --git a/Completion/Linux/Command/_ethtool b/Completion/Linux/Command/_ethtool
index 52b8f0451..84f2837a8 100644
--- a/Completion/Linux/Command/_ethtool
+++ b/Completion/Linux/Command/_ethtool
@@ -69,7 +69,7 @@ if [[ -n $state ]]; then
   rx-frames-low|tx-usecs-low|tx-frames-low|pkt-rate-high|rx-usecs-high) ;&
   rx-frames-high|tx-usecs-high|tx-frames-high|sample-interval|dmac|rx-mini) ;&
   rx-jumbo|offset|length|magic|value|phyad|proto|tos|tclass|l4proto|src-port) ;&
-  dst-port|spi|l4data|vlan-etype|vlan|user-def|action|vf|queue|loc|delete) ;&
+  dst-port|spi|l4data|vlan-etype|vlan|user-def|action|vf|queue|loc) ;&
   other|combined|tx-timer|count)
     _message -e numbers 'number'
   ;;
@@ -130,17 +130,20 @@ if [[ -n $state ]]; then
     _message -e masks mask
   ;;
   hkey)
-    _message -e keys expl 'hash key'
+    _message -e keys 'hash key'
   ;;
   hfunc)
-    _message -e functions expl 'hash function'
+    _message -e functions 'hash function'
   ;;
   flags)
-    _message -e masks expl mask
+    _message -e masks mask
   ;;
   encoding)
     _wanted encodings expl encoding compadd auto off rs baser
   ;;
+  context)
+    _message -e contexts 'RSS context'
+  ;;
   *)
     case $words[2] in
     -A|--pause)
@@ -218,7 +221,7 @@ if [[ -n $state ]]; then
       fi
           ;;
     -n|-u|--show-nfc|--show-ntuple)
-      _wanted options expl option compadd -F line - rx-flow-hash rule
+      _wanted options expl option compadd -F line - rx-flow-hash context rule
     ;;
     -N|-U|--config-nfc|--config-ntuple)
       if [[ $words[CURRENT-2] = rx-flow-hash ]]; then
@@ -231,19 +234,25 @@ if [[ -n $state ]]; then
           'f[bytes 0 and 1 of the Layer 4 header]' \
           'n[bytes 2 and 3 of the Layer 4 header]' \
           'r[discard all packets of this flow type]'
+      elif [[ $words[CURRENT-1] = delete ]]; then
+        _message -e numbers 'number'
       else
-        _wanted options expl option compadd -F line - rx-flow-hash flow-type \
+        _wanted options expl option compadd -F line - rx-flow-hash context flow-type \
             delete src dst proto src-ip dst-ip tos m tclass l4proto src-port \
             dst-port spi l4data vlan-etype vlan user-def dst-mac action vf \
-            queue loc
+            queue context loc
       fi
     ;;
+    -x|--show-rxfh-indir|--show-rxfh)
+      _wanted options expl option compadd -F line - context
+    ;;
     -X|--set-rxfh-indir|--rxfh)
       _values -S ' ' -w 'option' \
+        context \
         '(weight default)equal' \
         '(equal default)weight' \
         '(equal weight)default' \
-        hkey hfunc
+        hkey hfunc delete
     ;;
     -f|--flash)
       if (( CURRENT = 4 )); then
diff --git a/Completion/Linux/Command/_htop b/Completion/Linux/Command/_htop
index 9a6133a86..28c7512bf 100644
--- a/Completion/Linux/Command/_htop
+++ b/Completion/Linux/Command/_htop
@@ -1,10 +1,11 @@
 #compdef htop
 
 _arguments -S : \
-  '(-d --delay)'{-d+,--delay=}'[update frequency]:duration' \
+  '(-d --delay)'{-d+,--delay=}'[update frequency]:duration (tenths of seconds)' \
   '(-C --no-color --no-colour)'{-C,--no-colo{,u}r}'[monochrome mode]' \
-  '(-h --help)'{-h,--help}'[display help]' \
-  '(-p --pid)'{-p+,--pid=}'[show given pids]: : _sequence -n ${$(</proc/sys/kernel/pid_max)\:-32768} _pids' \
-  '(-s --sort-key)'{-s+,--sort-key=}'[sort by key]:key:( ${(f)"$($service --sort-key help)"} )' \
+  '(-)'{-h,--help}'[display usage information]' \
+  \*{-p+,--pid=}'[show given pids]: : _sequence -n ${$(</proc/sys/kernel/pid_max)\:-32768} _pids' \
+  '(-s --sort-key)'{-s+,--sort-key=}'[sort by key]:key:( ${(f)"$(_call_program sort-keys $words[1] --sort-key help)"} )' \
+  '(-t --tree)'{-t,--tree}'[show tree view of processes]' \
   '(-u --user)'{-u+,--user=}'[show processes of user]: : _users' \
-  '(-v --version)'{-v,--version}'[print version information]'
+  '(-)'{-v,--version}'[display version information]'
diff --git a/Completion/Linux/Command/_pidof b/Completion/Linux/Command/_pidof
index 6605e7e67..05fb23d45 100644
--- a/Completion/Linux/Command/_pidof
+++ b/Completion/Linux/Command/_pidof
@@ -10,7 +10,8 @@ _arguments -C -s -w \
   "(-s --single-shot $exargs)"{-s,--single-shot}'[return one PID only]' \
   "(-c --check-root $exargs)"{-c,--check-root}'[omit processes with different root]' \
   "(-x $exargs)"-x'[include shells running named scripts]' \
-  "($exargs)"\*{-o+,--omit-pid}'[omit processes with PIDs]:pids:_sequence -s , _pids' \
+  "($exargs)"\*{-o+,--omit-pid=}'[omit processes with PIDs]:pids:_sequence -s , _pids' \
+  '(-S --separator)'{-S+,--separator=}'[specify separator put between PIDs]:separator' \
   '*:process:->procnames' \
   && return 0
 
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 0eb16987d..f6cec8b60 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -116,6 +116,8 @@ _git-am () {
     '(-u --utf8 --no-utf8)--no-utf8[pass -n to git mailinfo]' \
     '(-3 --3way)'{-3,--3way}'[use 3-way merge if patch does not apply cleanly]' \
     $apply_options \
+    '--quit[abort the patching operation but keep HEAD where it is]' \
+    '--show-current-patch[show the patch being applied]' \
     '(-i --interactive)'{-i,--interactive}'[apply patches interactively]' \
     '--committer-date-is-author-date[use author date as committer date]' \
     '--ignore-date[use committer date as author date]' \
@@ -637,6 +639,7 @@ _git-clone () {
     '--separate-git-dir[place .git dir outside worktree]:path to .git dir:_path_files -/' \
     '(-4 --ipv4 -6 --ipv6)'{-4,--ipv4}'[use IPv4 addresses only]' \
     '(-4 --ipv4 -6 --ipv6)'{-6,--ipv6}'[use IPv6 addresses only]' \
+    '--filter=[object filtering]:filter:_git_rev-list_filters' \
     ': :->repository' \
     ': :_directories' && ret=0
 
@@ -685,6 +688,8 @@ _git-commit () {
     $reset_author_opt \
     '(        --porcelain --dry-run)--short[dry run with short output format]' \
     '--branch[show branch information]' \
+    '!(--no-ahead-behind)--ahead-behind' \
+    "--no-ahead-behind[don't display detailed ahead/behind counts relative to upstream branch]" \
     '(--short             --dry-run)--porcelain[dry run with machine-readable output format]' \
     '(--short --porcelain --dry-run -z --null)'{-z,--null}'[dry run with NULL-separated output format]' \
     {-p,--patch}'[use the interactive patch selection interface to chose which changes to commit]' \
@@ -865,6 +870,8 @@ _git-fetch () {
     '--deepen[deepen history of shallow clone]:number of commits' \
     '(-n --no-tags -t --tags)'{-n,--no-tags}'[disable automatic tag following]' \
     '(--all -m --multiple)'{-m,--multiple}'[fetch from multiple remotes]' \
+    '(-P --prune-tags)'{-P,--prune-tags}'[prune local tags no longer on remote and clobber changed tags]' \
+    '--filter=[object filtering]:filter:_git_rev-list_filters' \
     '*:: :->repository-or-group-or-refspec' && ret=0
 
   case $state in
@@ -1431,6 +1438,7 @@ _git-rebase () {
     '(-)--edit-todo[edit interactive instruction sheet in an editor]' \
     '(-)--skip[skip the current patch]' \
     '(-)--quit[abort but keep HEAD where it is]' \
+    '(-)--show-current-patch[show the patch file being applied or merged]' \
     - options \
     '(-m --merge)'{-m,--merge}'[use merging strategies to rebase]' \
     '(-S --gpg-sign --no-gpg-sign)'{-S-,--gpg-sign=-}'[GPG-sign the commit]::key id' \
@@ -1450,6 +1458,7 @@ _git-rebase () {
     '(-p --preserve-merges --interactive)'{-p,--preserve-merges}'[try to recreate merges instead of ignoring them]' \
     {-x+,--exec=}'[with -i\: append "exec <cmd>" after each line]:command:_command_names -e' \
     '(-k --keep-empty)'{-k,--keep-empty}'[keep empty commits in the result]' \
+    '--allow-empty-message[allow rebasing commits with empty messages]' \
     '(1)--root[rebase all reachable commits]' \
     $autosquash_opts \
     '(--autostash --no-autostash)--autostash[stash uncommitted changes before rebasing and apply them afterwards]' \
@@ -1747,6 +1756,8 @@ _git-status () {
     $branch_opts \
     '(-s --short)--porcelain=-[produce machine-readable output]:version:(v1)' \
     '(-s --short)--show-stash[show stash information]' \
+    '!(--no-ahead-behind)--ahead-behind' \
+    "--no-ahead-behind[don't display detailed ahead/behind counts relative to upstream branch]" \
     '(-u --untracked-files)'{-u-,--untracked-files=-}'[show untracked files]::mode:((no\:"show no untracked files" \
                                                                                      normal\:"show untracked files and directories" \
                                                                                      all\:"also show untracked files in untracked directories (default)"))' \
@@ -1988,6 +1999,7 @@ _git-tag () {
   _arguments \
     - creation \
       '(-a --annotate -s --sign -u --local-user)'{-a,--annotate}'[create an unsigned, annotated tag]' \
+      '(-e --edit)'{-e,--edit}'[force edit of tag message]' \
       '(-a --annotate -s --sign -u --local-user)'{-s,--sign}'[create a signed and annotated tag]' \
       '(-a --annotate -s --sign)'{-u+,--local-user=}'[create a tag, annotated and signed with the given key]: :__git_gpg_secret_keys' \
       '(-f --force)'{-f,--force}'[replace existing tag]' \
@@ -2037,6 +2049,8 @@ _git-worktree() {
         prune:'prune working tree information'
         list:'list details of each worktree'
 	lock:'prevent a working tree from being pruned'
+	move:'move a working tree to a new location'
+	remove:'remove a working tree'
 	unlock:'allow working tree to be pruned, moved or deleted'
       )
 
@@ -2051,32 +2065,44 @@ _git-worktree() {
 	  else
 	    args=( ':commit:__git_commits' )
 	  fi
-          _arguments \
+          _arguments -S \
 	    '(-f --force)'{-f,--force}'[checkout branch even if already checked out in another worktree]' \
 	    '(-B --detach)-b+[create a new branch]: :__git_branch_names' \
 	    '(-b --detach)-B+[create or reset a branch]: :__git_branch_names' \
 	    '(-b -B)--detach[detach HEAD at named commit]' \
 	    '--no-checkout[suppress file checkout in new worktree]' \
-	    ':path:_files' $args && ret=0
+	    '--lock[keep working tree locked after creation]' \
+	    ':path:_directories' $args && ret=0
 	;;
         (prune)
-          _arguments \
+          _arguments -S \
 	    '(-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]:time' && ret=0
 	;;
         (list)
-	  _arguments '--porcelain[machine-readable output]' && ret=0
+	  _arguments -S '--porcelain[machine-readable output]' && ret=0
 	;;
 	(lock)
-	  _arguments -C '--reason=[specify reason for locking]:reason' ': :->worktrees' && ret=0
-	  [[ -z $state ]] && return ret
-	;&
+	  _arguments -C -S '--reason=[specify reason for locking]:reason' ': :->worktrees' && ret=0
+	;;
+	(move)
+	  _arguments -C \
+            ': :->worktrees' \
+            ':location:_directories' && ret=0
+	;;
+	(remove)
+	  _arguments -C -S '--force[remove working trees that are not clean or that have submodules]' \
+            ': :->worktrees' && ret=0
+	;;
 	(unlock)
-	  _wanted directories expl 'working tree' compadd -S ' ' -f -M 'r:|/=* r:|=*' \
-	      ${${(M)${(f)"$(_call_program directories git worktree list --porcelain)"}:#worktree*}#* }
+	  state=worktrees
 	;;
       esac
+      if [[ $state = worktrees ]]; then
+        _wanted directories expl 'working tree' compadd -S ' ' -f -M 'r:|/=* r:|=*' \
+            ${${(M)${(f)"$(_call_program directories git worktree list --porcelain)"}:#worktree*}#* } && ret=0
+      fi
     ;;
   esac
   return ret
@@ -3442,6 +3468,7 @@ _git-prune () {
     '(-v --verbose)'{-v,--verbose}'[report all removed objects]' \
     '--progress[show progress]' \
     '--expire=[only expire loose objects older than specified date]: :__git_datetimes' \
+    '--exclude-promisor-objects[limit traversal to objects outside promisor packfiles]' \
     '*:: :__git_heads'
 }
 
@@ -4133,11 +4160,14 @@ _git-send-email () {
     '--cc-cover[copy the Cc: list from the first file to the rest]' \
     '--compose[edit introductory message for patch series]' \
     '--from=[specify sender]:email address:_email_addresses' \
+    '--reply-to=[specify Reply-To address]:email address:_email_addresses' \
     '--in-reply-to=[specify contents of first In-Reply-To header]:message-id' \
     '--subject=[specify the initial subject of the email thread]:subject' \
     '--to=[specify the primary recipient of the emails]: :_email_addresses' \
+    "--no-xmailer[don't add X-Mailer header]" \
     '--8bit-encoding=[encoding to use for non-ASCII messages]: :__git_encodings' \
     '--compose-encoding=[encoding to use for compose messages]: :__git_encodings' \
+    '--transfer-encoding=[specify transfer encoding to use]:transfer encoding:(quoted-printable 8bit base64)' \
     '--envelope-sender[specify the envelope sender used to send the emails]: :_email_addresses' \
     '--smtp-encryption=[specify encryption method to use]: :__git_sendemail_smtpencryption_values' \
     '--smtp-domain=[specify FQDN used in HELO/EHLO]: :_domains' \
@@ -4147,7 +4177,10 @@ _git-send-email () {
     '--smtp-server-option=[specify the outgoing SMTP server option to use]:SMPT server option' \
     '--smtp-ssl-cert-path=[path to ca-certificates (directory or file)]:ca certificates path:_files' \
     '--smtp-user=[specify user to use for SMTP-AUTH]:smtp user:_users' \
+    '--smtp-auth=[specify allowed AUTH mechanisms]:space-separated list of mechanisms' \
     '--smtp-debug=[enable or disable debug output]:smtp debug:((0\:"disable" 1\:"enable"))' \
+    '--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' \
     '--to-cmd=[specify command to generate To\: header with]:To\: command:_cmdstring' \
     '(                 --no-chain-reply-to)--chain-reply-to[send each email as a reply to previous one]' \
@@ -4168,6 +4201,7 @@ _git-send-email () {
     '(           --no-validate)--validate[perform sanity checks on patches]' \
     '(--validate              )--no-validate[do not perform sanity checks on patches]' \
     '--force[send emails even if safety checks would prevent it]' \
+    '(- *)--dump-aliases[dump configured aliases and exit]' \
     '*: : _alternative -O expl
       "files:file:_files"
       "commits:recent commit object name:__git_commit_objects_prefer_recent"'
@@ -4671,7 +4705,8 @@ _git-pack-objects () {
     '--use-bitmap-index[use a bitmap index if available to speed up counting objects]' \
     '--write-bitmap-index[write a bitmap index together with the pack index]' \
     '--filter=[omit certain objects from pack file]:filter:_git_rev-list_filters' \
-    '--missing=[specify how missing objects are handled]:action:(error allow-any print)' \
+    '--missing=[specify how missing objects are handled]:action:(error allow-any allow-promisor print)' \
+    "--exclude-promisor-objects[don't pack objects in promisor packfiles]" \
     ':base-name:_files'
 }
 
@@ -5080,7 +5115,7 @@ _git-rev-list () {
     '--no-filter[turn off any previous --filter argument]' \
     '--filter-print-omitted[print a list of objects omitted by --filter]' \
     '--filter=[omit certain objects from pack file]:filter:_git_rev-list_filters' \
-    '--missing=[specify how missing objects are handled]:action:(error allow-any print)' \
+    '--missing=[specify how missing objects are handled]:action:(error allow-any allow-promisor print)' \
     '(--count --pretty --header --left-right --abbrev-commit --abbrev --parent --children)--quiet[print nothing; exit status indicates if objects are fully connected]' \
     '--use-bitmap-index[try to speed traversal using pack bitmap index if available]' \
     '--progress=-[show progress reports as objects are considered]:header' \
@@ -5197,6 +5232,7 @@ _git-daemon () {
     '--forbid-override[forbid overriding site-wide service]: :__git_daemon_service' \
     '(--no-informative-errors)--informative-errors[report more verbose errors to the client]' \
     '(--informative-errors)--no-informative-errors[report all errors as "access denied" to the client]' \
+    '--log-destination=[send log messages to the specified destination]:destination:(stderr syslog none)' \
     '*:repository:_directories'
 }
 
@@ -7071,6 +7107,7 @@ __git_setup_diff_options () {
     '--diff-filter=-[select certain kinds of files for diff]: :_guard "[AaCcDdMmRrTtUuXxBb*]#" kinds'
     '-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'
+    '--find-object=[look for differences that change the number of occurrences of the specified object]:object:__git_blobs'
     '--pickaxe-all[when -S finds 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'
diff --git a/Completion/Unix/Command/_sed b/Completion/Unix/Command/_sed
index 222798b8a..15b92a634 100644
--- a/Completion/Unix/Command/_sed
+++ b/Completion/Unix/Command/_sed
@@ -21,6 +21,7 @@ elif _pick_variant gnu=GNU unix --version; then
   args+=(
     '--follow-symlinks[follow symlinks when processing in place]'
     '(-i --in-place)'{-i-,--in-place=-}$inplace
+    '(-c --copy)'{-c,--copy}'[copy instead of rename when shuffling files in in-place mode]'
     '(-l --line-length)'{-l,--line-length=-}'[specify line-wrap length for the l command]'
     '(-r)--posix[disable GNU extensions]'
     '(-E -r --regexp-extended)'{-E,-r,--regexp-extended}$extended
diff --git a/Completion/Unix/Command/_sqlite b/Completion/Unix/Command/_sqlite
index f63f4c085..58f7a9116 100644
--- a/Completion/Unix/Command/_sqlite
+++ b/Completion/Unix/Command/_sqlite
@@ -41,6 +41,7 @@ options+=(
 )
 
 (( $+sqlite3 )) && options+=(
+  $^dashes'-append[append the database to the end of the file]'
   $^dashes'-bail[stop after hitting an error]'
   $^dashes'-cmd[run specified command before reading stdin]:sqlite meta-command'
   '(-*batch -*interactive)'$^dashes'-batch[force batch I/O]'
@@ -49,6 +50,7 @@ options+=(
   $^dashes'-mmap[set default mmap size]:size'
   $^dashes'-newline[set output row separator]:separator [\n]'
   $^dashes'-pagecache[specify size and number of slots for page cache memory]:size (bytes): :slots'
+  $^dashes'-readonly[open the database read-only]'
   $^dashes'-stats[print memory stats before each finalize]'
   $^dashes'-vfs[use specified default VFS]:vfs:(unix-dotfile unix-excl unix-none unix-namedsem)'
 )
diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh
index 2aae7027e..9c827d655 100644
--- a/Completion/Unix/Command/_ssh
+++ b/Completion/Unix/Command/_ssh
@@ -32,6 +32,7 @@ _ssh () {
     _arguments -C -s \
       '(-a)-A[enable forwarding of the authentication agent connection]' \
       '(-A)-a[disable forwarding of authentication agent connection]' \
+      '-B+[bind to specified interface before attempting to connect]:interface:_net_interfaces' \
       '(-P)-b+[specify interface to transmit on]:bind address:_bind_addresses' \
       '-D+[specify a dynamic port forwarding]:dynamic port forwarding:->dynforward' \
       '-e+[set escape character]:escape character (or `none'\''):' \
@@ -90,6 +91,8 @@ _ssh () {
       '-k[load plain private keys only and skip certificates]' \
       '-L[list public key parameters of all identities in the agent]'\
       '-l[list all identities]' \
+      '-m+[specify minimum remaining signatures before maximum is changed]:number' \
+      '-M+[specify maximum number of signatures]:number' \
       '-s+[add keys provided by the PKCS#11 shared library]:library:_files -g "*.(so|dylib)(|.<->)(-.)"' \
       '-t+[set maximum lifetime for identity]:maximum lifetime (in seconds or time format):' \
       '-q[be quiet after a successful operation]' \



Messages sorted by: Reverse Date, Date, Thread, Author