Re: [patch] fix g_shell_quote



On Saturday, August 18, 2001, at 04:04  PM, Havoc Pennington wrote:

Darin Adler <darin bentspoon com> writes:

Here's the fix along with some tests in shell-test.c. The rule about
escape-sequence handling inside " marks in g_shell_unquote seems quite
strange, by the way.


You mean the behavior documented in the comments seems weird (in what
way?), or the code doesn't look like it works properly?

I guess I just wasn't familiar with the bizarre rules for escape characters inside quotes in sh. To quote the "sh" man page on one of my systems, "The backslash inside double quotes is historically weird, and serves to quote only the following characters: $ ` " \ <newline>. Otherwise it remains literal."

I'd personally like to see the list of characters in the g_shell_unquote or the g_shell_parse_argv gtk-doc comment, not just in the unquote_string_inplace comment. And I'd like to see a comment mention that the particular list of characters comes from the historically weird behavior of double quotes in sh.

    -- Darin




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]