Mercurial > hg > toybox
view toys/other/help.c @ 1178:f8432a8872e0 draft
More work on the cleanup page, partway through describing ifconfig.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 01 Jan 2014 15:00:44 -0600 |
parents | 34ac05521d94 |
children | 4654f241ccbe |
line wrap: on
line source
/* help.c - Show help for toybox commands * * Copyright 2007 Rob Landley <rob@landley.net> * * Often a shell builtin. USE_HELP(NEWTOY(help, "<1", TOYFLAG_BIN)) config HELP bool "help" default y depends on TOYBOX_HELP help usage: help [command] Show usage information for toybox commands. Run "toybox" with no arguments for a list of available commands. */ #include "toys.h" void help_main(void) { struct toy_list *t = toy_find(*toys.optargs); if (!t) error_exit("Unknown command '%s'", *toys.optargs); toys.which = t; show_help(); }