vhermecz / key-mon

Automatically exported from code.google.com/p/key-mon
Apache License 2.0
0 stars 0 forks source link

Command line argument error message is slightly confusing #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. key-mon --theme
or
2. key-mon --bla

Please provide any additional information below.
This results in:
1.
Usage: -c [options]

-c: error: --theme option requires an argument

2.
Usage: -c [options]

-c: error: no such option: --bla

The "-c" is annoying. Nothing tragic. ;-)
It might be due to this line in key-mon that optparse thinks the program is 
called "-c":
python -c 'import keymon.key_mon as km;km.main()' $* | grep -v Xlib.protocol

Hey, it may even not be your bug. :-)

Original issue reported on code.google.com by mbst...@googlemail.com on 20 Sep 2010 at 2:32

GoogleCodeExporter commented 8 years ago
Looks like optparse gets confused and things that %prod is -c instead of 
key-mon.

Original comment by scottaki...@gmail.com on 20 Sep 2010 at 2:50

GoogleCodeExporter commented 8 years ago
I understand.

Is there any special reason for not doing:
#!/usr/bin/python
import keymon.key_mon as km
km.main()

in key-mon? I'm not complaining, just asking. I guess the "grep" in the bash 
script is trying to get rid of some error message, right?

Original comment by mbst...@googlemail.com on 20 Sep 2010 at 2:55

GoogleCodeExporter commented 8 years ago
Fixed with your change and also adding an explicit Usage string.
The grep was to get rid of an annoying error message on my version of Ubuntu, 
but eventually someone will fix it so I'll leave it out.

Original comment by scottaki...@gmail.com on 21 Sep 2010 at 2:01

GoogleCodeExporter commented 8 years ago
This is perfect in key-mon 1.4.1.

Thanks for the fix!

Original comment by mbst...@googlemail.com on 22 Sep 2010 at 11:55