summaryrefslogtreecommitdiff
path: root/bash_completion
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-03-29 23:29:51 +0300
committerVille Skyttä <ville.skytta@iki.fi>2011-03-29 23:29:51 +0300
commit61b91cb41b222509a5bb0b7f04b28637a7a7ded0 (patch)
treeb3094f37dffe520cb1231b5f2cc80916daf9b1cd /bash_completion
parentc398b1c56fe3a952cb584355b87a918e9fded717 (diff)
downloadbash-completion-61b91cb41b222509a5bb0b7f04b28637a7a7ded0.tar.gz
Trivial code cleanup.
Diffstat (limited to 'bash_completion')
-rw-r--r--bash_completion5
1 files changed, 2 insertions, 3 deletions
diff --git a/bash_completion b/bash_completion
index 096e82fa..97da0e4d 100644
--- a/bash_completion
+++ b/bash_completion
@@ -675,9 +675,8 @@ _filedir()
fi
# If the filter failed to produce anything, try without it
- if [[ -n "$1" ]] && [[ "$1" != -d ]] && [[ ${#toks[@]} -lt 1 ]] ; then
- toks=( ${toks[@]-} $( compgen -f -- $quoted) )
- fi
+ [[ -n "$1" && "$1" != -d && ${#toks[@]} -lt 1 ]] && \
+ toks=( ${toks[@]-} $( compgen -f -- $quoted ) )
[ ${#toks[@]} -ne 0 ] && _compopt_o_filenames