aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bash/bash_completion.d/man.bash4
-rw-r--r--bash/bashrc2
2 files changed, 3 insertions, 3 deletions
diff --git a/bash/bash_completion.d/man.bash b/bash/bash_completion.d/man.bash
index f1762a01..d2499c0a 100644
--- a/bash/bash_completion.d/man.bash
+++ b/bash/bash_completion.d/man.bash
@@ -35,8 +35,8 @@ _man() {
# Iterate through the manual page paths and add every manual page we find
for manpath in "${manpaths[@]}" ; do
- [[ $manpath ]] || continue
- if [[ $section ]] ; then
+ [[ -n $manpath ]] || continue
+ if [[ -n $section ]] ; then
for page in "$manpath"/"$subdir"/"$word"*."$section"?(.[glx]z|.bz2|.lzma|.Z) ; do
pages[${#pages[@]}]=$page
done
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