Re: [patch] fix g_shell_quote
- From: Havoc Pennington <hp redhat com>
- To: Darin Adler <darin bentspoon com>
- Cc: gtk-devel-list gnome org
- Subject: Re: [patch] fix g_shell_quote
- Date: 19 Aug 2001 01:05:43 -0400
Darin Adler <darin bentspoon com> writes:
> 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."
Heh, this is by no means the weirdest thing about /bin/sh ;-)
Check out the UNIX98 spec sometime, well you probably saw
g_shell_parse_argv() - /bin/sh can basically only be specified by
explaining what algorithm you have to use in order to do everything,
there's no way to give a grammar or anything sane like that.
> 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.
Sure, I'll do some doc fixups right now.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]