summaryrefslogtreecommitdiff
path: root/completions/route
diff options
context:
space:
mode:
Diffstat (limited to 'completions/route')
-rw-r--r--completions/route10
1 files changed, 5 insertions, 5 deletions
diff --git a/completions/route b/completions/route
index a7c06d6d..f9b31964 100644
--- a/completions/route
+++ b/completions/route
@@ -17,14 +17,14 @@ _route()
for opt in add del -host -net netmask metric mss window irtt reject mod \
dyn reinstate dev default gw; do
found=false
- for (( i=1; i < ${#words[@]}-1; i++ )); do
- [[ ${words[i]} == $opt ]] && found=true && break
+ for ((i = 1; i < ${#words[@]} - 1; i++)); do
+ [[ ${words[i]} == "$opt" ]] && found=true && break
done
- $found || COMPREPLY[${#COMPREPLY[@]}]="$opt"
+ $found || COMPREPLY+=("$opt")
done
- COMPREPLY=( $(compgen -W '"${COMPREPLY[@]}"' -- "$cur") )
+ COMPREPLY=($(compgen -W '"${COMPREPLY[@]}"' -- "$cur"))
} &&
-complete -F _route route
+ complete -F _route route
# ex: filetype=sh