From 423e47360e2bf0a905929d1dfe0c7ecd40c6b243 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 18 Aug 2016 12:02:19 +1200 Subject: 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 --- bash/bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bash/bashrc') 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: (E13) -if [[ $COMP_WORDBREAKS ]] ; then +if [[ -n $COMP_WORDBREAKS ]] ; then COMP_WORDBREAKS=${COMP_WORDBREAKS//:} fi -- cgit v1.2.3