From 11f034226fbf0a57fa2828924a874acb7bc74494 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 19 Aug 2001 05:52:40 +0000 Subject: [PATCH] add comment about shell quoting rules to the docs. 2001-08-19 Havoc Pennington * glib/gshell.c (g_shell_unquote): add comment about shell quoting rules to the docs. --- ChangeLog | 5 +++++ ChangeLog.pre-2-0 | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ ChangeLog.pre-2-2 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ glib/gshell.c | 7 +++++++ 9 files changed, 47 insertions(+) diff --git a/ChangeLog b/ChangeLog index a2efbea..8aeb2c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-08-19 Havoc Pennington + + * glib/gshell.c (g_shell_unquote): add comment about shell quoting + rules to the docs. + 2001-08-16 Ron Steinke * glib/giounix.c: fixed an error in setting close_on_unref diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index a2efbea..8aeb2c9 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +2001-08-19 Havoc Pennington + + * glib/gshell.c (g_shell_unquote): add comment about shell quoting + rules to the docs. + 2001-08-16 Ron Steinke * glib/giounix.c: fixed an error in setting close_on_unref diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index a2efbea..8aeb2c9 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2001-08-19 Havoc Pennington + + * glib/gshell.c (g_shell_unquote): add comment about shell quoting + rules to the docs. + 2001-08-16 Ron Steinke * glib/giounix.c: fixed an error in setting close_on_unref diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index a2efbea..8aeb2c9 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2001-08-19 Havoc Pennington + + * glib/gshell.c (g_shell_unquote): add comment about shell quoting + rules to the docs. + 2001-08-16 Ron Steinke * glib/giounix.c: fixed an error in setting close_on_unref diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index a2efbea..8aeb2c9 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +2001-08-19 Havoc Pennington + + * glib/gshell.c (g_shell_unquote): add comment about shell quoting + rules to the docs. + 2001-08-16 Ron Steinke * glib/giounix.c: fixed an error in setting close_on_unref diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index a2efbea..8aeb2c9 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +2001-08-19 Havoc Pennington + + * glib/gshell.c (g_shell_unquote): add comment about shell quoting + rules to the docs. + 2001-08-16 Ron Steinke * glib/giounix.c: fixed an error in setting close_on_unref diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index a2efbea..8aeb2c9 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2001-08-19 Havoc Pennington + + * glib/gshell.c (g_shell_unquote): add comment about shell quoting + rules to the docs. + 2001-08-16 Ron Steinke * glib/giounix.c: fixed an error in setting close_on_unref diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index a2efbea..8aeb2c9 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2001-08-19 Havoc Pennington + + * glib/gshell.c (g_shell_unquote): add comment about shell quoting + rules to the docs. + 2001-08-16 Ron Steinke * glib/giounix.c: fixed an error in setting close_on_unref diff --git a/glib/gshell.c b/glib/gshell.c index 79db9d3..e27d799 100644 --- a/glib/gshell.c +++ b/glib/gshell.c @@ -231,6 +231,13 @@ g_shell_quote (const gchar *unquoted_string) * newlines. The return value must be freed with g_free(). Possible * errors are in the #G_SHELL_ERROR domain. * + * Shell quoting rules are a bit strange. Single quotes preserve the + * literal string exactly. escape sequences are not allowed; not even + * \' - if you want a ' in the quoted text, you have to do something + * like 'foo'\''bar'. Double quotes allow $, `, ", \, and newline to + * be escaped with backslash. Otherwise double quotes preserve things + * literally. + * * Return value: an unquoted string **/ gchar* -- 2.7.4