mpalmer/giddyup — pull request #6 by saj (2012-05-01 07:28:42+00:00)
Title: Give * the freedom it needs to expand

Fix for #5.

Space paranoia is maintained even though the asterisk is not inside
quotes:

% pwd
/Users/sgoonatilleke/Desktop/a space

% ls -1
baz qux/
foo bar/
test*

% cat test
#!/bin/bash --posix

some_dir=$(pwd -P)

for f in "${some_dir}/"*; do
echo "|${f}|"
done

% ./test
|/Users/sgoonatilleke/Desktop/a space/baz qux|
|/Users/sgoonatilleke/Desktop/a space/foo bar|
|/Users/sgoonatilleke/Desktop/a space/test|