Options order....

Mathieu Clabaut mathieu.clabaut at gmail.com
Mon May 7 07:03:41 UTC 2007


n 5/7/07, Giorgos Keramidas <keramida at ceid.upatras.gr> wrote:
>
> On 2007-05-06 22:30, Mathieu Clabaut <mathieu.clabaut at gmail.com> wrote:
> > On 5/6/07, Marcin Kasperski <Marcin.Kasperski at softax.com.pl> wrote:
> > > Guido Ostkamp napisa?(a):
> > > >>> You need to specify the options before the files.
> > > >> I already noticed it. The question is: *why*?
> > > >
> > > > probably because that's pretty much standard for most commands.
> > >
> > > Well, hard to say what is 'standard', but most unix commands I use
> allow
> > > one to freely mix options and params. For example subversion and cvs
> > > work so, both
> > > svn ci . -m 'blah'
> > > and
> > > cvs ci . -m 'bleh'
> > > work.
> >
> > I may add that the ability of "rm" to freely mix options and params
> > save me of big troubles.  I before was used to wrote :
> >
> >  rm -rf *.bak
> >
> > Which causes big trouble when you inadvertently bump the Return key
> > after the star !
> >
> > I now every time type
> >
> > rm *.bak -rf
> >
> > I think it would be a nice addition to mercurial UI if possible.
>
> FWIW, this may work with the GNU version of rm(1), but it fails with all
> the other rm(1) implementations I regularly use (on Solaris and BSD).
>
> It's a nice feature, but it's far less portable that I would like it to
> be, so I try to avoid it.




Yes indeed.
I agree that the options mixing feature is only useful in  an interactive
context (it allows either  disaster prevention in the case of rm, or more
friendly UI which is nearer to the intellectual flow : i.e. In order, I
think that I must commit (hg ci) some files (.)  related to some actions (-m
message)...)
But when writing portable script, I naturally stick to the option first
scheme (at least for shell commands)).

-mathieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20070507/12bb4fb0/attachment-0001.html>


More information about the Mercurial mailing list