aboutsummaryrefslogtreecommitdiff
path: root/shell-completion/bash/ethtool
diff options
context:
space:
mode:
Diffstat (limited to 'shell-completion/bash/ethtool')
-rw-r--r--shell-completion/bash/ethtool30
1 files changed, 30 insertions, 0 deletions
diff --git a/shell-completion/bash/ethtool b/shell-completion/bash/ethtool
index 5305559..99c5f6f 100644
--- a/shell-completion/bash/ethtool
+++ b/shell-completion/bash/ethtool
@@ -97,6 +97,7 @@ _ethtool_change()
[speed]=notseen
[wol]=notseen
[xcvr]=notseen
+ [lanes]=notseen
)
local -A msgtypes=(
@@ -175,6 +176,9 @@ _ethtool_change()
xcvr)
COMPREPLY=( $( compgen -W 'internal external' -- "$cur" ) )
return ;;
+ lanes)
+ # Number
+ return ;;
esac
local -a comp_words=()
@@ -250,6 +254,9 @@ _ethtool_coalesce()
[tx-usecs-high]=1
[tx-usecs-irq]=1
[tx-usecs-low]=1
+ [tx-aggr-max-bytes]=1
+ [tx-aggr-max-frames]=1
+ [tx-aggr-time-usecs]=1
)
case "$prev" in
@@ -1133,6 +1140,27 @@ _ethtool_test()
fi
}
+# Completion for ethtool --set-module
+_ethtool_set_module()
+{
+ local -A settings=(
+ [power-mode-policy]=1
+ )
+
+ case "$prev" in
+ power-mode-policy)
+ COMPREPLY=( $( compgen -W 'high auto' -- "$cur" ) )
+ return ;;
+ esac
+
+ # Remove settings which have been seen
+ local word
+ for word in "${words[@]:3:${#words[@]}-4}"; do
+ unset "settings[$word]"
+ done
+
+ COMPREPLY=( $( compgen -W "${!settings[*]}" -- "$cur" ) )
+}
# Complete any ethtool command
_ethtool()
@@ -1185,6 +1213,8 @@ _ethtool()
[--show-time-stamping]=devname
[--statistics]=devname
[--test]=test
+ [--set-module]=set_module
+ [--show-module]=devname
)
local -A other_funcs=(
[--config-ntuple]=config_nfc