From: Keith Marshall Date: Mon, 16 Apr 2018 14:53:36 +0000 (+0100) Subject: Suppress glob-brace expansion within quoted arguments. X-Git-Tag: wsl-5.1.1-release~7 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;ds=sidebyside;h=753e249cdb3480951addf1c33151922cdd09705f;p=mingw%2Fmingw-org-wsl.git Suppress glob-brace expansion within quoted arguments. --- diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index e108893..fe327f1 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,5 +1,12 @@ 2018-04-16 Keith Marshall + Suppress glob-brace expansion within quoted arguments. + + * setargv.c (__mingw32_setargv) [quoted]: Handle '{', ',', and '}' + in the same manner as '*', and '?'. + +2018-04-16 Keith Marshall + Suppress glob-brace expansion of single item lists. * mingwex/glob.c (glob_match) [c == '{']: Look-ahead to matching '}'; diff --git a/mingwrt/setargv.c b/mingwrt/setargv.c index 1b57f85..3ac119d 100644 --- a/mingwrt/setargv.c +++ b/mingwrt/setargv.c @@ -8,7 +8,7 @@ * $Id$ * * Written by Keith Marshall - * Copyright (C) 2014, 2017, MinGW.org Project + * Copyright (C) 2014, 2017, 2018, MinGW.org Project * * --------------------------------------------------------------------------- * @@ -143,9 +143,14 @@ void __mingw32_setargv( const char *cmdline ) */ bracket = (_CRT_glob & ARGV_NOGROUP) ? 0 : ARGV_NOGROUP; - case '*': - case '?': - /* These standard globbing tokens... + case '*': case '?': + /* These standard globbing tokens,... + */ + case '{': case ',': case '}': + /* ...this additional triplet, non-standard, but required + * to support GNU's GLOB_BRACE extension; (strictly we need + * to consider these only if GLOB_BRACE is enabled, but it + * should do no harm to consider them regardless),... */ case ARGV_ESCAPE: /* ...and the escape character itself, need to be escaped