commit | b2356f6de94820291f35d63943a622708546b59c | [log] [tgz] |
---|---|---|
author | Eric Andersen <andersen@codepoet.org> | Mon Dec 11 19:14:40 2000 +0000 |
committer | Eric Andersen <andersen@codepoet.org> | Mon Dec 11 19:14:40 2000 +0000 |
tree | bd50b81de4d0c86b1bb73655ac1b511e33041ff0 | |
parent | 59ec601b8e4db86e1861d12f4efc6d1dbb440e28 [diff] [blame] |
Patch from Matt Kraai to fox sh.c escape problem such that running things like 'echo "\n\tHi\n\t\!"' and 'echo -e "\n\tHi\n\t\!"' behave as under bash.
diff --git a/sh.c b/sh.c index 07715d4..9fc215c 100644 --- a/sh.c +++ b/sh.c
@@ -933,8 +933,10 @@ } /* in shell, "\'" should yield \' */ - if (*src != quote) + if (*src != quote) { *buf++ = '\\'; + *buf++ = '\\'; + } } else if (*src == '*' || *src == '?' || *src == '[' || *src == ']') *buf++ = '\\'; *buf++ = *src;