diff options
author | Steven Schubiger <stsc@refcnt.org> | 2013-01-28 20:10:22 +0100 |
---|---|---|
committer | Steven Schubiger <stsc@refcnt.org> | 2013-01-28 20:10:22 +0100 |
commit | 0802a010b347abd0172beb4411cd2b6af946f73b (patch) | |
tree | 38b434c2727db99456f874c0b2ca0e7394f07333 | |
parent | 781ef6e57f5b1fdd3f355f27edfaae16e90cb903 (diff) | |
download | colorize-0802a010b347abd0172beb4411cd2b6af946f73b.tar.gz colorize-0802a010b347abd0172beb4411cd2b6af946f73b.tar.bz2 |
Enhance message if color string exists as file
-rw-r--r-- | colorize.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -403,7 +403,12 @@ process_options (unsigned int arg_cnt, char **option_strings, bool *bold, const have_file = (*color != '\0'); if (have_file) - vfprintf_fail (formats[FMT_GENERIC], "file must be preceeded by color string"); + { + if (file_string) + vfprintf_fail (formats[FMT_GENERIC], "file cannot be used as color string"); + else + vfprintf_fail (formats[FMT_GENERIC], "file must be preceeded by color string"); + } } if ((p = strchr (color_string, '/'))) |