From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <200910070930.aa64725@salmon.maths.tcd.ie> References: <544954.87352.qm@web83908.mail.sp1.yahoo.com> <200910061900.ab25356@salmon.maths.tcd.ie> <13426df10910061127m7331b58dqba8abf01a0fc11f8@mail.gmail.com> <200910070930.aa64725@salmon.maths.tcd.ie> Date: Wed, 7 Oct 2009 12:05:34 +0100 Message-ID: From: roger peppe 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: 82e44d18-ead5-11e9-9d60-3106f5b1d025 2009/10/7 John Stalker : > Rm is, I think, an example of someone who simply wasn't thinking > properly. =C2=A0In > > =C2=A0 =C2=A0 =C2=A0 =C2=A0rm `{ complicated pipeline } > > I almost certainly want the exit status to reflect whether all the > selected files were deleted, even if there weren't any, so I want > rm without arguments to succeed silently. it does under plan 9. FWIW, my experimental "alphabet" shell formalised the types of command line arguments and checked usage before invoking the actual command. each option took a fixed number of arguments; options were followed by zero or more fixed arguments, optionally followed by a repeated argument of the same type. this was sufficient for many of the conventional commands, but not, for instance, mv which has a fixed argument at the end. as with any language, static typing is an advantage (it avoids some errors) and a disadvantage (it's hard to do some things because they don't fit within the type system). mileage varies.