On 18-07-2012 15:58:18 -0400, Michael Mol wrote:
> > along with all other commands can work like before.
> >
> > /etc/init.d/foo stop -- start
> >
> > can pass start as an argument to the stop command.
> 
> I like this approach, because its use of -- continues expected
> commandline parsing behaviors from other commands, making it
> intuitive.
> 
> I.e.
> 
> touch -- -an-ugly-filename
> ls -l -- -an-ugly-filename
> rm -- -an-ugly-filename

yeah, but it means something like "don't treat the '-' as anything
special any more", so if you don't have something starting with -, you
don't need --.  Hence, following your "expected" behaviour argument,

/etc/init.d/foo stop start

would do the same as

/etc/init.d/foo stop -- start

or

/etc/init.d/foo -- stop start


Perhaps, one better makes it explicit, inspired by gdb

/etc/init.d/foo stop --args aggressive-kill=yes
(and when using --args, I'd probably disallow using multiple commands to
keep it clear what's going on)


Fabian

-- 
Fabian Groffen
Gentoo on a different level

Attachment: signature.asc
Description: Digital signature

Reply via email to