diff options
author | Mikael Magnusson <mikachu@gmail.com> | 2011-07-27 10:26:25 +0000 |
---|---|---|
committer | Mikael Magnusson <mikachu@gmail.com> | 2011-07-27 10:26:25 +0000 |
commit | c3d1277229c81e646e00cbd5d55e69d715e26023 (patch) | |
tree | 5970cafe8294a612da9c1a3efc8ac892c9240ced /Completion | |
parent | 45913f43e54beacca4feb614bbe80089cec6f490 (diff) | |
download | zsh-c3d1277229c81e646e00cbd5d55e69d715e26023.tar.gz zsh-c3d1277229c81e646e00cbd5d55e69d715e26023.tar.xz zsh-c3d1277229c81e646e00cbd5d55e69d715e26023.zip |
29618: Fix some syntax to not depend on SHORT_LOOPS being set.
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Linux/Command/_ethtool | 8 | ||||
-rw-r--r-- | Completion/Zsh/Type/_file_descriptors | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/Completion/Linux/Command/_ethtool b/Completion/Linux/Command/_ethtool index a01d38823..5d607741f 100644 --- a/Completion/Linux/Command/_ethtool +++ b/Completion/Linux/Command/_ethtool @@ -3,9 +3,9 @@ local -a cmds if [[ $CURRENT -ge 4 ]]; then - case $words[CURRENT-1]; in + 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 + [[ $words[2] = '-G' ]] && _message -e n 'number of ring entries' || _wanted -x onoff expl 'enabled' compadd off on ;; autoneg|adaptive-rx|adaptive-tx|raw|hex|sg|tso|ufo|gso) _wanted -x onoff expl 'enabled' compadd off on @@ -55,7 +55,7 @@ if [[ $CURRENT -ge 4 ]]; then _wanted files expl 'raw register dump files' _files ;; *) - case $words[2]; in + case $words[2] in -A|--pause) _values -S ' ' -w 'pause options' \ 'autoneg[specify if pause autonegotiation is enabled]' \ @@ -111,7 +111,7 @@ if [[ $CURRENT -ge 4 ]]; then 'gso[specify if generic segmentation offload is enabled]' ;; -p|--identify) - if [[ $CURRENT -eq 4 ]] && _message -e length 'seconds' + [[ $CURRENT -eq 4 ]] && _message -e length 'seconds' ;; -t|--test) _values -S ' ' -w 'selftest option' \ diff --git a/Completion/Zsh/Type/_file_descriptors b/Completion/Zsh/Type/_file_descriptors index 1dac47f61..3e251b733 100644 --- a/Completion/Zsh/Type/_file_descriptors +++ b/Completion/Zsh/Type/_file_descriptors @@ -13,7 +13,9 @@ if zstyle -T ":completion:${curcontext}:" verbose && [[ -h /proc/$$/fd/$fds[1] ] list+=( "$i $sep ${link[1]}" ) done elif (( $+commands[readlink] )); then - for i in "${fds[@]}"; list+=( "$i $sep $(readlink /proc/$$/fd/$i)" ) + for i in "${fds[@]}"; do + list+=( "$i $sep $(readlink /proc/$$/fd/$i)" ) + done else for i in "${fds[@]}"; do list+=( "$i $sep $(ls -l /proc/$$/fd/$i|sed 's/.*-> //' )" ) |