view toys/other/help.c @ 986:69adf14d70e1

System V style init, submitted by Kyungwan Han.
author Rob Landley <>
date Sun, 04 Aug 2013 00:31:27 -0500
parents 34ac05521d94
children 4654f241ccbe
line wrap: on
line source

/* help.c - Show help for toybox commands
 * Copyright 2007 Rob Landley <>
 * Often a shell builtin.


config HELP
  bool "help"
  default y
  depends on TOYBOX_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;