Fix printf output to use %s, not %q

This commit is contained in:
Nathan Broadbent
2011-12-23 11:47:08 +08:00
parent 9b0852de2d
commit d5080aa3d3

View File

@@ -150,7 +150,7 @@ git_expand_args() {
else else
echo -n " " echo -n " "
fi fi
eval printf '%q' "\$$git_env_char$arg" eval printf '%s' "\$$git_env_char$arg"
elif [[ "$arg" =~ ^[0-9]+\.\.[0-9]+$ ]]; then # Expand ranges into $e{*} variables elif [[ "$arg" =~ ^[0-9]+\.\.[0-9]+$ ]]; then # Expand ranges into $e{*} variables
for i in $(eval echo {$arg}); do for i in $(eval echo {$arg}); do
if [ "$first" -eq 1 ]; then if [ "$first" -eq 1 ]; then
@@ -158,7 +158,7 @@ git_expand_args() {
else else
echo -n " " echo -n " "
fi fi
eval printf '%q' "\$$git_env_char$i" eval printf '%s' "\$$git_env_char$i"
done done
else # Otherwise, treat $arg as a normal string. else # Otherwise, treat $arg as a normal string.
if [ "$first" -eq 1 ]; then if [ "$first" -eq 1 ]; then
@@ -166,7 +166,7 @@ git_expand_args() {
else else
echo -n " " echo -n " "
fi fi
printf '%q' "$arg" printf '%s' "$arg"
fi fi
done done
} }