hush: fix bug 207 and "hush -c" parameter passing.

Now hush -c 'printf "%s\n" "$@"' (prints "\n")
 and hush -c 'printf "%s\n" "$@"' qwe asd (prints "asd\n")
 both work correctly
This commit is contained in:
Denis Vlasenko
2009-03-20 12:05:14 +00:00
parent 5368ad53e9
commit a8b6dff97f
3 changed files with 16 additions and 2 deletions

View File

@@ -1,2 +1,3 @@
Should be printed
Should be printed
Empty:

View File

@@ -12,3 +12,6 @@ for a in "$@"""; do echo Should not be printed; done
for a in """$@"; do echo Should not be printed; done
for a in """$@"''"$@"''; do echo Should not be printed; done
for a in ""; do echo Should be printed; done
# Bug 207: "$@" expands to nothing, and we erroneously glob "%s\\n" twice:
printf "Empty:%s\\n" "$@"