Xref: utzoo comp.lang.c:9130 comp.unix.wizards:7690 Path: utzoo!mnetor!uunet!husc6!uwvax!rutgers!gatech!hubcap!ncrcae!ncr-sd!crash!kenobi!ford From: ford@kenobi.UUCP (Mike Ditto) Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: command line options Message-ID: <72@kenobi.UUCP> Date: 10 Apr 88 17:23:24 GMT References: <2414@zyx.UUCP> <8039@elsie.UUCP> <7628@brl-smoke.ARPA> <10219@ulysses.homer.nj.att.com> <48963@sun.uucp> Organization: Omnicron Data Systems, P.O. Box 1721, Bonita, California Lines: 30 In-reply-to: guy@gorodish.Sun.COM's message of 9 Apr 88 21:18:17 GMT Posting-Front-End: GNU Emacs 18.41.10 of Fri Oct 2 1987 on kenobi (usg-unix-v) In article <48963@sun.uucp> guy@gorodish.Sun.COM (Guy Harris) writes: > > That's because the shell is expanding -? to "-w -x". If there is no > > match, the shell leaves the -? alone. > > I think he already knew that - that was his whole point! He gave a > real, not a hypothetical, case where the shell *will* expand "-?" > to something, rather than leaving it alone, and therefore where "-?" > won't do what it has, on occasion, been claimed to do. > > "-?" is *NOT* guaranteed to give you a usage message, with *ANY* > shell, unless you put it in quotes. I think everybody already knew that - "-?" is *NOT* guaranteed to do *ANYTHING* in particular unless you put it in quotes. That's why it makes a good choice for a help option: it's too awkward ever to be used for a normal option, so you might as well reserve it for those times when you want a usage and you have no idea what options are valid. Of course, people who often find themselves needing help won't like the awkwardness of typing the quotes, but I think it's quite reasonable. -\? also works (less typing). -=] Ford [=- "Once there were parking lots, (In Real Life: Mike Ditto) now it's a peaceful oasis. ford%kenobi@crash.CTS.COM This was a Pizza Hut, ...!sdcsvax!crash!kenobi!ford now it's all covered with daisies." -- Talking Heads