Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site looking.UUCP Path: utzoo!watmath!looking!brad From: brad@looking.UUCP (Brad Templeton) Newsgroups: net.unix,net.cog-eng Subject: + - and = in option strings Message-ID: <136@looking.UUCP> Date: Mon, 19-Mar-84 00:00:00 EST Article-I.D.: looking.136 Posted: Mon Mar 19 00:00:00 1984 Date-Received: Mon, 19-Mar-84 07:30:11 EST References: <1817@rlgvax.UUCP> Organization: Looking Glass Software, Waterloo, Ont Lines: 32 I am surprised all this debate didn't go on when I posted the "Waterloo Command Syntax Philosophy" to this group back in the beginning. Around here the rule is "+" turns on an option and "-" turns it off. Options without boolean values are set by option=value or option="value" (for strings) or option=value,value,value... They have an almost 100% rule that options are valid anywhere on the command line, and that unflagged operands are always the same type of thing. (ie. no grep string filename, it is grep "string" filename or grep Pattern=string filename) There was a lot of feeling that using +option and -option would be a real pain because most options are turned on and + is a shifted character on most terminals. But... lo and behold when the switch was made, there was almost no complaint, and everybody got used to it quite quickly. You would be amazed at how quickly people will adapt to this kind of thing. But after all, many common characters are shifted, like ", ' (on some) > and <, as well as $ and many other shell metacharacters. Hell, some systems have # for a delete character (shifted) and multics people like using ">" as a path character (unix slash equivalent) so people will use anything and get used to it quickly. In fact, these days I can't see any good reason except momentum for unix not to switch over to a consistent, easy to learn syntax. It can be done slowly, since as I pointed out previously, unix has no standard or solid custom. Why not write all new commands with a new syntax. We have library routines at Waterloo that make parsing command lines of this form simple. -- Brad Templeton - Waterloo, Ontario (519) 886-7304