]> git.refcnt.org Git - colorize.git/blobdiff - colorize.c
Enhance message if attribute is invalid
[colorize.git] / colorize.c
index 2d6bfea5bb68718f7677601424a5f4f1f1569f3c..1e27fcae01878ea6f41c90adac3c52aa7138317b 100644 (file)
@@ -468,7 +468,14 @@ process_opt_attr (const char *p)
                   }
               }
             if (!valid_attr)
-              vfprintf_fail (formats[FMT_GENERIC], "--attr switch must be provided valid attribute names");
+              {
+                char *sep;
+                char *attr_invalid = xstrdup (s);
+                STACK_VAR (attr_invalid);
+                if ((sep = strchr (attr_invalid, ',')))
+                  *sep = '\0';
+                vfprintf_fail ("--attr switch attribute '%s' is not valid", attr_invalid);
+              }
           }
         if (*p)
           p++;