aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_completion.d
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/bash_completion.d
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/bash_completion.d')
-rw-r--r--bash/bash_completion.d/man.bash4
1 files changed, 2 insertions, 2 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