On Thu, May 28, 2015 at 07:37:52PM +0200, S??bastien Marie wrote:
> Hi,
> 
> I would report (and correct) an invalid usage statement of file(1).
> 
> $ file
> usage: file [-bchiLsW] [file ...]
> 
> $ man file | grep -A1 'SY'
> SYNOPSIS
>      file [-bchiLsW] file ...
> 
> As at least one argument is mandatory, removing the [] would make sens.
> 
> Thanks.
> -- 
> S??bastien Marie
> 

not exactly..."file -c" works, for example. but i think it makes most
sense to show it as being required, and this way at least the doc/usage
are in sync.

so, fixed now.
jmc

> 
> Index: file.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/file/file.c,v
> retrieving revision 1.32
> diff -u -p -r1.32 file.c
> --- file.c    24 Apr 2015 17:34:57 -0000      1.32
> +++ file.c    28 May 2015 17:30:09 -0000
> @@ -85,7 +85,7 @@ static struct option longopts[] = {
>  __dead void
>  usage(void)
>  {
> -     fprintf(stderr, "usage: %s [-bchiLsW] [file ...]\n", __progname);
> +     fprintf(stderr, "usage: %s [-bchiLsW] file ...\n", __progname);
>       exit(1);
>  }
>  
> 

Reply via email to