]> Savannah Git Hosting - gnulib.git/commitdiff
sh-quote, system-quote: Add comments about wildcards.
authorBruno Haible <bruno@clisp.org>
Sat, 12 May 2012 09:25:17 +0000 (11:25 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 12 May 2012 09:25:17 +0000 (11:25 +0200)
* lib/sh-quote.h: Clarify what happens with wildcard characters.
* lib/system-quote.h: Likewise.
Reported by Eli Zaretskii <eliz@gnu.org>.

ChangeLog
lib/sh-quote.h
lib/system-quote.h

index 805ebb7c2eecd4379c4cd25eb26e4bf983dbfaec..c92156ca9c56ccf3f69305073777e9f273f29309 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-05-12  Bruno Haible  <bruno@clisp.org>
+
+       sh-quote, system-quote: Add comments about wildcards.
+       * lib/sh-quote.h: Clarify what happens with wildcard characters.
+       * lib/system-quote.h: Likewise.
+       Reported by Eli Zaretskii <eliz@gnu.org>.
+
 2012-05-11  Paul Eggert  <eggert@cs.ucla.edu>
 
        fsusage: check for GNU/Linux statvfs problem dynamically
index 12c3dd3c2d6ae6b30c38d7fcaf0f642c389fb7f5..50956d0705e449212fb09f52308c829396d51fed 100644 (file)
@@ -20,7 +20,7 @@
 
 /* When passing a command to a shell, we must quote the program name and
    arguments, since Unix shells interpret characters like " ", "'", "<", ">",
-   "$" etc. in a special way.  */
+   "$", '*', '?' etc. in a special way.  */
 
 #include <stddef.h>
 
index d5f29780b7895fc3761fb635a515304c9f36780c..48d59efaa101668d02fb4a9931d0f3b111490ef6 100644 (file)
 
 /* When passing a command the system's command interpreter, we must quote the
    program name and arguments, since
-     - Unix shells interpret characters like " ", "'", "<", ">", "$" etc. in a
-       special way,
+     - Unix shells interpret characters like " ", "'", "<", ">", "$", '*', '?'
+       etc. in a special way,
      - Windows CreateProcess() interprets characters like ' ', '\t', '\\', '"'
        etc. (but not '<' and '>') in a special way,
      - Windows cmd.exe also interprets characters like '<', '>', '&', '%', etc.
        in a special way.  Note that it is impossible to pass arguments that
        contain newlines or carriage return characters to programs through
-       cmd.exe.  */
+       cmd.exe.
+     - Windows programs usually perform wildcard expansion when they receive
+       arguments that contain unquoted '*', '?' characters.  */
 
 #include <stddef.h>