diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2011-03-29 23:29:51 +0300 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-03-29 23:29:51 +0300 |
commit | 61b91cb41b222509a5bb0b7f04b28637a7a7ded0 (patch) | |
tree | b3094f37dffe520cb1231b5f2cc80916daf9b1cd /bash_completion | |
parent | c398b1c56fe3a952cb584355b87a918e9fded717 (diff) | |
download | bash-completion-61b91cb41b222509a5bb0b7f04b28637a7a7ded0.tar.gz |
Trivial code cleanup.
Diffstat (limited to 'bash_completion')
-rw-r--r-- | bash_completion | 5 |
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 |