aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-18 12:02:19 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-18 12:02:19 +1200
commit423e47360e2bf0a905929d1dfe0c7ecd40c6b243 (patch)
tree1e02dc4dfd471fc6771a562db1683ab85327a91a /bash/bashrc
parentUse consistent syntax for sh source loops (diff)
downloaddotfiles-423e47360e2bf0a905929d1dfe0c7ecd40c6b243.tar.gz
dotfiles-423e47360e2bf0a905929d1dfe0c7ecd40c6b243.zip
Use explicit -n test within [[ ]]
Bash doesn't require it, but there's no real advantage to it and it's a better habit for complying with e.g. pdksh, which does
Diffstat (limited to 'bash/bashrc')
-rw-r--r--bash/bashrc2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash/bashrc b/bash/bashrc
index 0e1859ad..220ecec6 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -102,7 +102,7 @@ fi
# If COMP_WORDBREAKS has a value, strip all colons from it; this allows
# completing filenames correctly, since an unquoted colon is not a syntactic
# character: <http://tiswww.case.edu/php/chet/bash/FAQ> (E13)
-if [[ $COMP_WORDBREAKS ]] ; then
+if [[ -n $COMP_WORDBREAKS ]] ; then
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
fi