[Toybox] [PATCH] New toy - printenv

Rob Landley rob at landley.net
Sat Mar 3 22:53:31 PST 2012


On 02/27/2012 06:31 PM, Georgi Chorbadzhiyski wrote:
> In the attached file you'll find implementation of printenv command.
> 
> What is the correct way (if there is one currently) to add long options.

In parentheses, as a suffix. In the option string, "ab(longforb)c".

> According to printenv man page -0 is alias to --null. Currently printenv.c
> supports only -0.

Need to check for "=" as part of the match or else you also match on
longer environment variables that start with this name as a prefix.

I refactored it so there's only one instance of each loop.

If you tell it to print an environment variable that doesn't exist,
return code should be 1.

Fixed a typo in the help text.

Rob



More information about the Toybox mailing list