[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fix AT_SETUP's sh-escaping
From: |
Paul Eggert |
Subject: |
Re: fix AT_SETUP's sh-escaping |
Date: |
Thu, 09 Nov 2006 16:42:28 -0800 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Ralf Wildenhues <address@hidden> writes:
> 1) I don't see how Paul's quoting changes actually fix a portability
> issue, but it's pretty clear that they don't hurt.
You're right, my mistake. The code is portable to all POSIX shells.
I vaguely recall older shells where the double-quoted shell string
"\x" evaluated to x rather than \x but perhaps my memory is mistaken.
That being said, I prefer escaping \ within double-quoted shell strings,
even when POSIX says it's not necessary, since I think it's clearer
and more consistent to do so.
> At which point I gave up. I think using cat and here-documents
> everywhere is a complete waste. IMHO we should document that
> backslashes in AT_SETUP's argument are dangerous (who would need that
> anyway?), disable the test (because it will pass when all echos in use
> do not interpret backslashes)
That will be never, I'm afraid, as XSI requires interpretation.
How about if we use something like the ECHO_C / ECHO_N technology
instead? I'll take a look at it, I guess.