On 23/01/16 03:03, Assaf Gordon wrote:
> From e3623e537c3b198c5ec126dc4d556ffd0f00ea92 Mon Sep 17 00:00:00 2001
> From: Assaf Gordon <[email protected]>
> Date: Wed, 20 Jan 2016 19:43:29 -0500
> Subject: [PATCH] date: add '--debug' option
> 
> * src/date.c: (main): add '--debug' option, enable debugging
>    in gnulib's parse-datetime.y module.
> * tests/misc/date.pl: repeat tests with '--debug' enable, ensure
>    no regression.

* NEWS: Needs an entry.
* doc/coreutils.texi: Likewise.

It would be good to compare expected debug output in the tests,
but you're right to wait until the output format is locked down fully.

> diff --git a/src/date.c b/src/date.c

> @@ -133,6 +135,8 @@ Display the current time in the given FORMAT, or set the 
> system date.\n\
>  
>        fputs (_("\
>    -d, --date=STRING          display time described by STRING, not 'now'\n\
> +      --debug                annotate the parsed date,\n\
> +                              and warn about questionable usage to stderr\n\
>    -f, --file=DATEFILE        like --date; once for each line of DATEFILE\n\
>  "), stdout);
>        fputs (_("\

It's better to fputs() just the --debug help separate
from existing --help output, to simplify translators jobs.

gnulib review in a separate reply to the updated gnulib portion.

thanks,
Pádraig


Reply via email to