aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_completion.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-23 20:33:01 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-23 20:38:05 +1200
commit86c56cb8fb1c0ab723cb79652f8e750c79006426 (patch)
tree1acfa855f31121ccadd8f0d5062aec028e718afc /bash/bash_completion.d
parentAdd -r to read to placate shellcheck (diff)
downloaddotfiles-86c56cb8fb1c0ab723cb79652f8e750c79006426.tar.gz
dotfiles-86c56cb8fb1c0ab723cb79652f8e750c79006426.zip
Explicitly declare array to reassure shellcheck
Diffstat (limited to 'bash/bash_completion.d')
-rw-r--r--bash/bash_completion.d/man.bash5
1 files changed, 2 insertions, 3 deletions
diff --git a/bash/bash_completion.d/man.bash b/bash/bash_completion.d/man.bash
index d2499c0a..7456f69b 100644
--- a/bash/bash_completion.d/man.bash
+++ b/bash/bash_completion.d/man.bash
@@ -27,13 +27,12 @@ _man() {
shopt -u dotglob
shopt -s extglob nullglob
- # Start an array of pages
- declare -a pages
-
# Break manpath(1) output into an array of paths
+ declare -a manpaths
IFS=: read -a manpaths -r < <(manpath 2>/dev/null)
# Iterate through the manual page paths and add every manual page we find
+ declare -a pages
for manpath in "${manpaths[@]}" ; do
[[ -n $manpath ]] || continue
if [[ -n $section ]] ; then