Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!texsun!convex!rosenkra From: rosenkra@convex.com (William Rosencranz) Newsgroups: comp.sys.atari.st Subject: Re: standard practices Message-ID: <1991Mar23.104227.6554@convex.com> Date: 23 Mar 91 10:42:27 GMT References: <1991Mar20.204257.26740@convex.com> <7340099@hpfcso.FC.HP.COM> Sender: usenet@convex.com (news access account) Organization: Convex Computer Corporation, Richardson, Tx. Lines: 103 Nntp-Posting-Host: convex1.convex.com In article <7340099@hpfcso.FC.HP.COM> mjs@hpfcso.FC.HP.COM (Marc Sabatella) writes: >help stuff belongs in a separate "man page" if you really want to be Unix-like i still can't understand why you all think -help (or whatever it may be called) is such a lousy idea. really, what can it hurt? why can't we have both man for detailed explanations, and an option in the command itself for just a synopsis % command usage: command [options] file ... -a this does something -b this does something else ... one screen, max. i have absolutely nothing against man. heck, i just posted a version a couple of weeks ago. i also wrote nroff, and use it daily, but also find it extremely nice to just type "command -help" if i forget a lesser used option. with man, i have to 1) search for a keyword with its pager (i use less), 2) hope that the keyword i chose is indicative of what i am trying to find *quickly*, 3) hope that in addition to finding the keyword, i find the switch i was looking for. perhaps i should have said % command -synopsis rather than "-help" which seems to strike a bad chord here. >and "what" or "ident" can report version and change history information. what looks for SCCS/RCS id strings. so only if they exist can what work. the what i have seen (4.2BSD) searches for "@(#)" and "$H", for example. i have a version of what on my ST. and i don't know about you, but MY atari does not have SCCS, a licensed product from at&t. yes, i know we now have RCS at least. remember: we are talking about a possible standard for TOS applications on the ST for cmd shell users, not redesigning unix. you are forcing developers to use RCS just so a user can find out if he has the latest version of a program. is that really what you are saying? personally i think more people would use cmd shells if it was not so intimidating or cryptic. i think we will both agree that doing any kind of serious programming is far easier and far more productive from cmd shells (like gulam, bash, ksh, etc, which all happen to be or patterned after unix). and what is too verbose, especially if it finds version strings in every libc routine. granted, most implementations don't have id strings in libc, but in a swiftly changing environment like gnu c, for example, it might not be a bad idea. i was refering more to the the application itself: % command command 1.1 91/3/23 % is this really that painful? or do you prefer strings `which command` | grep command as more "true to unix"? >It (or else XPG2 and XPG3) does say something about your choice of options: >they are unacceptable. They bless "getopt" as the means of parsing arguments. no. i almost never use getopt, prefering to hand code the option parser. i don't particularly like getopt myself and have seen few BSD or even USG commands which use it. and no, i have not looked at every single source file in unix, but i have looked at 40 or 50 command sources over the years. >doesn't). In general, multi-character options beginning with "-" are frowned >upon. check your manpage on man itself: man -S ... with number scrunched next to the switch. there are other unix commands like this, eg troff -man ..., etc. and yes, you can claim that troff is not part of unix per se (except it is in BSD). i also realize that there are as many implementations of man as there are unix vendors, so don't beat me up because 4 or 5 of the ones i know about use this particular style. and if you ever looked at the manpage for gnu c, you'd probably go crazy (i did the first time, with all those 10+ char long options, though they may be unique to some number of characters). > Instead, use something like > > -A,help > +help ok. i really don't care what we call these, i was really more interested in providing the funtionality. if you want to use "+opt" or "@opt" or whatever, i really don't care. let's not quibble over specifics at this point. what about the basic idea itself, to provide the functionality? personnally, i find -A,help really cryptic, just to satisfy a weak programming practice. i can live with "+help", though i still find it more cryptic than "-help". i give up. let's move on (but all programs i post will have these features, so there! :-) -bill rosenkra@convex.com -- Bill Rosenkranz |UUCP: {uunet,texsun}!convex!c1yankee!rosenkra Convex Computer Corp. |ARPA: rosenkra%c1yankee@convex.com