From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <646955677faa922172207300b93ff6ea@hamnavoe.com> References: <20091004071748.GA16895@nipl.net> <646955677faa922172207300b93ff6ea@hamnavoe.com> Date: Tue, 6 Oct 2009 08:59:32 +0200 Message-ID: <5d375e920910052359q74f7d070v677ba9fae4d01b02@mail.gmail.com> From: Uriel To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] mishandling empty lists - let's fix it Topicbox-Message-UUID: 8064a81c-ead5-11e9-9d60-3106f5b1d025 On Sun, Oct 4, 2009 at 12:46 PM, Richard Miller <9fans@hamnavoe.com> wrote: >> =C2=A0 `--' ends options, forces consistent multi-file mode, allows empt= y lists > > Hey, yeah, great idea. =C2=A0And why not use '---' to force switching to > Linux compatible mode, and '----' to switch to BSD syntax, and '-----' > for System V syntax (5 hyphens, System 5, easy to remember). =C2=A0Oh, an= d we > might need a way to switch back to Plan 9 syntax. =C2=A0That better be '' > (0 hyphens). > > Example: > > =C2=A0cat ---- -s ----- -s '' -v > > prints the contents of file named '-v', squeezing multiple empty lines > (BSD -s) and silencing error message (System V -s). I'm sure the people in charge of writing the next version of the PoSix standard will be very happy to adopt your proposal! That is, if they have not independently 'discovered' this fantastic solution to this horrible 'problem' already on their own. Of course, they could also move with the times, and adopt an XML format for command arguments which would be much more extensible and Web 2.0 compliant. That way all commands could share the same dynamically linked parser, and one could write scripts with their favorite XML-editor! uriel