[Toybox] --help option.

Rob Landley rob at landley.net
Fri May 17 23:36:45 PDT 2013


On 04/29/2013 12:35:00 PM, Felix Janda wrote:
> > Is there special reason for not supporting long option?
> 
> That they are from GNU. It simplifies deleting files named "--help".^^

A while back I jadded --help to the toybox multiplexer (as an alias for  
the "help" command), so at least busybox people confused by that would  
have less of a hard time.

I'm trying to figure out if I should just make --help be understood by  
all commands, but...

1) Not everything uses the option parsing infrastructure. "true --help"  
wouldn't do anything if lib/args.c is doing it. I could instead have  
the toy_exec() check for "--help" as one of the arguments, and run help  
instead of the command in question. (Should it check for it as the  
_first_ argument? Sigh, it's uncomfortably magic either way...)

2) This raises the possibility that "ls *" will get confused if a file  
in the current directory is called "--help". Then again, that may  
already be the case...

Rob


More information about the Toybox mailing list