command line options
David L. Smith
dave at sdeggo.UUCP
Tue Apr 12 01:31:10 AEST 1988
In article <7652 at brl-smoke.ARPA>, gwyn at brl-smoke.ARPA (Doug Gwyn ) writes:
> In article <191 at sdeggo.UUCP> dave at sdeggo.UUCP (David L. Smith) writes:
> >There's a basic flaw in this little scheme, why doesn't
> >everyone just admit it and come up with a better idea?
>
> There is NOT a basic flaw in the scheme; I use it all the time
> and it works much better than the suggested alternatives (which
> DON'T WORK AT ALL because they are not currently implemented!).
> Note that I didn't have to do anything to have this feature
> available; it's already there. I thought you might like to hear
> about it so as to be able to exploit it, but feel free to not
> use it while you work on some grandiose scheme that practically
> nobody will adopt (as Henry has pointed out).
I don't see anything grandiose about adding "-HELP" into getopt and having
that return a '?' to the calling program. Do you? This would only require
recompilation to work. I doubt there are many existing programs that use
this for anything other than help, it doesn't conflict with any metacharacters
and it would be very easy to implement.
The "-?" would not be useful with those programs like sed and grep which
process regular expressions.
> If you think the existence of shell metacharacters is a "basic
> flaw", well perhaps it is if you plop naive users in front of
> a terminal running a raw Bourne shell or csh. They were not
> intended to serve as naive-user interfaces. Somehow I don't
> have trouble with this even when using the -? trick.
This is _not_ what I said. Overloading these operators in fifteen different
ways is a problem. We have too many overloaded shell operators as it is.
Why make more trouble?
Maybe I'm just not as smart or as nimble-fingered as you are Doug, but I
forget to quote things sometimes, or the \ key sticks after I press it
the fifth time in a row in a single command line. I appreciate the shells'
power, and hence their complexity, but there is no need to add needless
complexity.
--
David L. Smith
{sdcsvax!jack,ihnp4!jack, hp-sdd!crash, pyramid, uport}!sdeggo!dave
sdeggo!dave at amos.ling.edu
Sinners can repent, but stupid is forever.
More information about the Comp.unix.wizards
mailing list