Permalink
Browse files

Quotes around array expansion

  • Loading branch information...
bahamas10 committed May 25, 2012
1 parent 021d276 commit 1ad6769540caea064dd394ef20e4d837853a40d5
Showing with 2 additions and 2 deletions.
  1. +2 −2 bin/mad
View
@@ -22,7 +22,7 @@ list_pages() {
echo
printf " \033[1mmad pages:\033[0m\n"
echo
- for path in ${path_array[@]}; do
+ for path in "${path_array[@]}"; do
[[ -z "$path" || ! -d "$path" ]] && continue
while read -r -d '' file; do
file=${file##*/} # basename
@@ -47,7 +47,7 @@ display() {
local path_array=
IFS=: read -a path_array <<< "$paths"
- for path in ${path_array[@]}; do
+ for path in "${path_array[@]}"; do
local file=$path/$page
local ext=$path/$page.md
[[ -f "$file" ]] && display_file "$file"

0 comments on commit 1ad6769

Please sign in to comment.