Previously, quotes were required in autogroup configuration
using the windowname,windowclass syntax because the grammar
does not allow commas in strings.  This change removes that
requirement by explicitly matching literal commas.  Quotes
are still required around name or class values that contain
spaces.

Index: cwm/parse.y
===================================================================
--- cwm.orig/parse.y    2012-11-02 10:14:41.427202533 -0500
+++ cwm/parse.y 2012-11-02 10:16:58.308357594 -0500
@@ -139,6 +139,17 @@
                        group_make_autogroup(conf, $2, $3, NULL);
                        free($3);
                }
+               | AUTOGROUP NUMBER STRING ',' STRING    {
+                       if ($2 < 0 || $2 > 9) {
+                               free($3);
+                               yyerror("autogroup number out of range: %d", 
$2);
+                               YYERROR;
+                       }
+
+                       group_make_autogroup(conf, $2, $5, $3);
+                       free($3);
+                       free($5);
+               }
                | IGNORE STRING {
                        struct winmatch *wm;

Reply via email to