about summary refs log tree commit diff
path: root/Completion/Linux
diff options
context:
space:
mode:
authorOliver Kiddle <okiddle@yahoo.co.uk>2018-04-16 17:02:56 +0200
committerOliver Kiddle <okiddle@yahoo.co.uk>2018-04-16 17:02:56 +0200
commit39f58eb318104d15afbe8dbdb9c93df2b50c2b69 (patch)
treea121d2a20c3e6010664c21cc13a419bc1e96ff36 /Completion/Linux
parentb69a3416192f47b1ebc4f93df5e507d4cb1f3894 (diff)
downloadzsh-39f58eb318104d15afbe8dbdb9c93df2b50c2b69.tar.gz
zsh-39f58eb318104d15afbe8dbdb9c93df2b50c2b69.tar.xz
zsh-39f58eb318104d15afbe8dbdb9c93df2b50c2b69.zip
42659: various completion option updates
Diffstat (limited to 'Completion/Linux')
-rw-r--r--Completion/Linux/Command/_ethtool25
-rw-r--r--Completion/Linux/Command/_htop11
-rw-r--r--Completion/Linux/Command/_pidof3
3 files changed, 25 insertions, 14 deletions
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