cwm -h

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

cwm -h

Gleydson Soares-3
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

Reply | Threaded
Open this post in threaded view
|

Re: cwm -h

Pierre Riteau-3
On Fri, Jun 6, 2008 at 12:35 AM, Gleydson Soares <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

Re: cwm -h

Owain Ainsworth-2
In reply to this post by Gleydson Soares-3
On Thu, Jun 05, 2008 at 07:35:29PM -0300, Gleydson Soares wrote:
> hi slackers,
>
> the diff speak itself.
>
> ok ? comments ? :-)

No... Just no!

without this diff:

oga@stephanie:~$cwm -h
cwm: unknown option -- h
usage: cwm [-d display] [-c file]


yeah, you get the "unknown option" message, but who really cares?

The manpage is there if you need help. It'll tell you in better terms
anyway.

-0-
--
Alexander Graham Bell is alive and well in New York, and still waiting
for a dial tone.

Reply | Threaded
Open this post in threaded view
|

Re: cwm -h

Gleydson Soares-3
On Thu, Jun 5, 2008 at 8:37 PM, Owain Ainsworth <[hidden email]> wrote:

> No... Just no!
>
> without this diff:
>
> oga@stephanie:~$cwm -h
> cwm: unknown option -- h
> usage: cwm [-d display] [-c file]
>
>
> yeah, you get the "unknown option" message, but who really cares?
>
> The manpage is there if you need help. It'll tell you in better terms
> anyway.
>

ok, that is your personal option.

just for examples, the "pfctl and man" elegantly don't show me a
"unknown option" when i need write a "pfctl -h" and "man -h" rapidly,

cheers,
gsoares