Re: cwm -h

"Pierre Riteau" <[email protected]> Fri, 6 Jun 2008 00:48:08 +0200
Newsgroups gmane.os.openbsd.x11
Message-ID <[email protected]>
On Fri, Jun 6, 2008 at 12:35 AM, Gleydson Soares <[email protected]> wrote:
> hi slackers,
>
> the diff speak itself.
>
> ok ? comments ? :-)
>
> cheers,
> gsoares
> Index: calmwm.c
> ===================================================================
> RCS file: /cvs/xenocara/app/cwm/calmwm.c,v
> retrieving revision 1.20
> diff -u -r1.20 calmwm.c
> --- calmwm.c    21 May 2008 14:11:19 -0000      1.20
> +++ calmwm.c    5 Jun 2008 22:27:34 -0000
> @@ -56,7 +56,7 @@
>
>        char *display_name = NULL;
>
> -       while ((ch = getopt(argc, argv, "c:d:")) != -1) {
> +       while ((ch = getopt(argc, argv, "c:d:h")) != -1) {
>                switch (ch) {
>                case 'c':
>                        conf_file = optarg;
> @@ -64,6 +64,7 @@
>                case 'd':
>                        display_name = optarg;
>                        break;
> +               case 'h':
>                default:
>                        usage();
>                }
> @@ -317,6 +318,6 @@
>  {
>        extern char *__progname;
>
> -       fprintf(stderr, "usage: %s [-d display] [-c file]\n", __progname);
> +       fprintf(stderr, "usage: %s [-h] [-d display] [-c file]\n", __progname);
>        exit(1);
>  }
> Index: cwm.1
> ===================================================================
> RCS file: /cvs/xenocara/app/cwm/cwm.1,v
> retrieving revision 1.31
> diff -u -r1.31 cwm.1
> --- cwm.1       5 Jun 2008 14:29:01 -0000       1.31
> +++ cwm.1       5 Jun 2008 22:27:52 -0000
> @@ -133,6 +133,8 @@
>  .Nm
>  are as follows:
>  .Bl -tag -width Ds
> +.It Fl h
> +Help.
>  .It Fl d Ar display
>  Specify the display to use.
>  .It Fl c Ar file
>
>

My opinion: if you want help, read the manpage.
And if you really just want usage, running cwm -? will most likely
print it nicely to you.

-- 
Pierre Riteau