Subject: Re: getopt replacement, part 2
To: Thomas Klausner <>
From: Simon J. Gerraty <>
List: tech-userlevel
Date: 12/06/2000 22:25:34
>This is a question of consistency. Most of these programs just don't
>test if there's a getopt in the system they are installing on. The
>issue here is, if we want to be able to do
>	grep somestring * -r
>and have this interpreted as 
>	grep -r somestring *

No, I definitely would not like grep to behave like that.
That might be how GNU-grep works - but its not how grep should.
Its bogus. 

As to one of your earlier comments about "-" in optstr, its actually 
quite handy - after a simple bug fix to getopt(3) so that --foo is 
not interpreted as --. The one can have -: in optstr and get a simple hook
to pickup --long_options of course one could argue that if you want that
you should use gnu getopt, but the munging described above suggests that 
gnu getopt is more trouble that its worth.