diff options
Diffstat (limited to 'Completion/Linux/Command/_ethtool')
| -rw-r--r-- | Completion/Linux/Command/_ethtool | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/Completion/Linux/Command/_ethtool b/Completion/Linux/Command/_ethtool new file mode 100644 index 000000000..50ab9f741 --- /dev/null +++ b/Completion/Linux/Command/_ethtool @@ -0,0 +1,141 @@ +#compdef ethtool + +local -a cmds + +if [[ $CURRENT -ge 4 ]]; then + case $words[CURRENT-1]; in + rx|tx) + if [[ $words[2] = '-G' ]] && _message -e n 'number of ring entries' || _wanted -x onoff expl 'enabled' compadd off on + ;; + autoneg|adaptive-rx|adaptive-tx|raw|sg|tso) + _wanted -x onoff expl 'enabled' compadd off on + ;; + rx-usecs|rx-frames|rx-usecs-irq|rx-frames-irq|tx-usecs|tx-frames|tx-usecs-irq|tx-frames-irq|stats-block-usecs|pkt-rate-low|rx-usecs-low|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|rx-mini|rx-jumbo|offset|length|magic|value|phyad|msglvl) + _message -e n 'number' + ;; + speed) + _wanted -x speed expl 'speed' compadd 10 100 1000 + ;; + duplex) + _wanted -x duplex expl 'duplex mode' compadd half full + ;; + port) + _wanted -x port expl 'device port' compadd tp aui bnc mii + ;; + xcvr) + _wanted -x xcvr expl 'transceiver type' compadd internal external + ;; + wol) + _values -s '' 'Wake-on-LAN options' \ + '(d)p[Wake on phy activity]' \ + '(d)u[Wake on unicast messages]' \ + '(d)m[Wake on multicast messages]' \ + '(d)b[Wake on broadcast messages]' \ + '(d)a[Wake on ARP]' \ + '(d)g[Wake on MagicPacket(tm)]' \ + '(d)s[Enable SecureOn(tm) password for MagicPacket(tm)]' \ + '(p u m b a g s)d[Disable (wake on nothing)]' + ;; + sopass) + _message -e secureon 'password - 6 bytes in ethernet MAC hex format (xx:yy:zz:aa:bb:cc)' + ;; + *) + case $words[2]; in + -A) + _values -S ' ' -w 'pause options' \ + 'autoneg[Specify if pause autonegotiation is enabled]' \ + 'rx[Specify if RX pause is enabled]' \ + 'tx[Specify if TX pause is enabled]' + ;; + -C) + _values -S ' ' -w 'coalescing settings' \ + 'adaptive-rx' 'adaptive-tx' \ + 'rx-usecs' 'rx-frames' 'rx-usecs-irq' 'rx-frames-irq' \ + 'tx-usecs' 'tx-frames' 'tx-usecs-irq' 'tx-frames-irq' \ + 'stats-block-usecs' \ + 'pkt-rate-low' \ + 'rx-usecs-low' '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' + ;; + -G) + _values -S ' ' -w 'ring parameters' \ + 'rx[Change number of ring entries for the RX ring]' \ + 'rx-mini[Change number of ring entries for the RX Mini ring]' \ + 'rx-jumbo[Change number of ring entries for the RX Jumbo ring]' \ + 'tx[Change number of ring entries for the TX ring]' + ;; + -d) + _values -S ' ' -w 'register dump options' \ + 'raw[dump raw register data]' + ;; + -e) |
