lazo --help [command]
542600
function help(command) {
    switch (command) {
        case 'start':
            console.log('\nUsage: lazo start app_dir -c [num] -d -p [num]\n');
            console.log('Options:\n');
            console.log('app_dir [required] application directory');
            console.log('-c [optional] cluster, value [optional]\n');
            console.log('-d [optional] daemonize process using forever\n');
            console.log('-p [optional] port, value [required]\n');
            break;
        case 'stop':
            console.log('\nUsage: lazo stop\n');
            break;
        default:
            console.log('\nUsage: lazo --help command\n');
            console.log('Available commands: start stop\n');
            console.log('Options:\n');
            console.log('command [optional]\n');
            break;
    }
}
993486
def get_command(self, ctx, name):
        """"""
        plugin = os.path.basename(self.folder)
        try:
            command = importlib.import_module("honeycomb.commands.{}.{}".format(plugin, name))
        except ImportError:
            raise click.UsageError("No such command {} {}\n\n{}".format(plugin, name, self.get_help(ctx)))
        return getattr(command, name)
27331
public function limitedAskCommand(): void
    {
        $times = (int)$this->input->getOpt('limit', 3);

        if ($this->input->getBoolOpt('nv')) {
            $a = Interact::limitedAsk('you name is: ', '', null, $times);
        } else {
            $a = Interact::limitedAsk('you name is: ', '', function ($val) {
                if (!\preg_match('/^\w{2,}$/', $val)) {
                    Show::error('Your input must match /^\w{2,}$/');
                    return false;
                }

                return true;
            }, $times);
        }

        $this->write('Your answer is: ' . $a);
    }
410503
public function helpPanelCommand(): void
    {
        Show::helpPanel([
            HelpPanel::DESC      => 'a help panel description text. (help panel show)',
            HelpPanel::USAGE     => 'a usage text',
            HelpPanel::ARGUMENTS => [
                'arg1' => 'arg1 description',
                'arg2' => 'arg2 description',
            ],
            HelpPanel::OPTIONS   => [
                '--opt1'     => 'a long option',
                '-s'         => 'a short option',
                '-d'         => 'Run the server on daemon.(default: <comment>false</comment>)',
                '-h, --help' => 'Display this help message'
            ],
        ]);
    }
1136111
function commands(req, res /*, next */) {
  req.app.commands.forEach(function(command) {
    res.writeln(command);
  });
  res.end();
}
557704
public static function writeHelpCommand($command = "") {
		
		/*
		
		The command help follows this format:
		
		Build Command Options
		
		Usage:
		  php core/console --build [--patternsonly|-p] [--nocache|-n] [--enablecss|-c]
		
		Available options:
		  --patternsonly (-p)    Build only the patterns. Does NOT clean public/.
		  --nocache      (-n)    Set the cacheBuster value to 0.
		  --enablecss    (-c)    Generate CSS for each pattern. Resource intensive.
		  --help         (-h)    Display this help message.
		
		Help:
		 The build command builds an entire site a single time. It compiles the patterns and moves content from source/ into public/
		
		 Samples:
		
		   To run and generate the CSS for each pattern:
		     php core/console --build -c
		
		   To build only the patterns and not move other files from source/ to public/
		     php core/console --build -p
		
		   To turn off the cacheBuster
		     php core/console --build -n
		*/
		
		// if given an empty command or the command doesn't exist in the lists give the generic help
		if (empty($command)) {
			self::writeHelp();
			return;
		}
		
		$commandLong       = self::$commands[$command]["commandLong"];
		$commandLongUC     = ucfirst($commandLong);
		$commandHelp       = self::$commands[$command]["commandHelp"];
		$commandExtra      = isset(self::$commands[$command]["commandExtra"]) ? self::$commands[$command]["commandExtra"] : "";
		$commandOptions    = self::$commands[$command]["commandOptions"];
		$commandExamples   = self::$commands[$command]["commandExamples"];
		$commandShort      = self::$commands[$command]["commandShort"];
		$commandShortInc   = ($commandShort != "") ? "|-".$commandShort : "";
		
		// write out the option list and get the longest item
		$optionList = "";
		$lengthLong = 0;
		foreach ($commandOptions as $option => $attributes) {
			$optionShort = (!empty($attributes["optionShort"][0]) && (($attributes["optionShort"][0] != "z") || ($attributes["optionShort"] != ""))) ? "|-".$attributes["optionShort"] : "";
			$optionExtra = (!empty($attributes["optionExtra"])) ? " ".$attributes["optionExtra"] : "";
			$optionList .= "[--".$attributes["optionLong"].$optionShort.$optionExtra."] ";
			$lengthLong = ($attributes["optionLongLength"] > $lengthLong) ? $attributes["optionLongLength"] : $lengthLong;
		}
		
		$commandExampleList = "";
		if (count($commandExamples) > 0) {
			foreach ($commandExamples as $example => $attributes) {
				$commandExampleList .= $attributes["exampleExtra"]." ";
			}
		}
		
		// write out the generic usage info
		self::writeLine("");
		self::writeLine("<h1>".$commandLongUC." Command Options</h1>",true,true);
		self::writeLine("<h2>Usage</h2>:",true,true);
		self::writeLine("  php ".self::$self." --".$commandLong.$commandShortInc." ".$optionList,true,true);
		
		// write out the available options
		if (count($commandOptions) > 0) {
			self::writeLine("<h2>Available options</h2>:",true,true);
			foreach ($commandOptions as $option => $attributes) {
				$optionShort = (!empty($attributes["optionShort"]) && (($attributes["optionShort"][0] != "z") || ($attributes["optionShort"] != ""))) ? "(-".$attributes["optionShort"].")" : "    ";
				$spacer = self::getSpacer($lengthLong,$attributes["optionLongLength"]);
				self::writeLine("  --".$attributes["optionLong"].$spacer.$optionShort."    <desc>".$attributes["optionDesc"]."</desc>",true);
			}
			self::writeLine("");
		}
		
		self::writeLine("<h2>Help</h2>:",true,true);
		self::writeLine("  ".$commandHelp,true,true);
		
		// write out the samples
		if ((count($commandOptions) > 0) || (count($commandExamples) > 0)) {
			self::writeLine("<h2>Samples</h2>:",true,true);
		}
		
		if (count($commandExamples) > 0) {
			foreach ($commandExamples as $example => $attributes) {
				self::writeLine(" ".$attributes["exampleSample"],true,true);
				self::writeLine("   <desc>php ".self::$self." --".$commandLong." ".$attributes["exampleExtra"]."</desc>",true,true);
			}
		}
		
		if (count($commandOptions) > 0) {
			foreach ($commandOptions as $option => $attributes) {
				self::writeLine(" ".$attributes["optionSample"],true,true);
				self::writeLine("   <desc>php ".self::$self." --".$commandLong." --".$attributes["optionLong"]." ".$attributes["optionExtra"]."</desc>",true,true);
			}
		}
		
	}
1245884
def command?(cmd)
      cg = MiniGit::Capturing.new
      cmd_list = cg.help :a => true
      # typical run:
      # usage: git [--version] [--help] [-C <path>] [-c name=value]
      #            [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
      #            [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
      #            [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
      #            <command> [<args>]
      #
      # available git commands in '/usr/local/Cellar/git/1.8.5.2/libexec/git-core'
      #
      #   add   [...]   \
      #   [...]          | The part we are interested in, delimited by '\n\n' sequence
      #   [...]         /
      #
      # 'git help -a' and 'git help -g' lists available subcommands and some
      # concept guides. See 'git help <command>' or 'git help <concept>'
      # to read about a specific subcommand or concept
      l = cmd_list.split("\n\n")
      l.shift # useless first part
      #ap l
      subl = l.each_index.select { |i| l[i] =~ /^\s\s+/ } # find sublines that starts with at least two whitespaces
      #ap subl
      return false if subl.empty?
      subl.any? { |i| l[i].split.include?(cmd) }
    end
671860
protected function showHelp(): bool
    {
        if (!$definition = $this->getDefinition()) {
            return false;
        }

        // if has InputDefinition object. (The comment of the command will not be parsed and used at this time.)
        $help = $definition->getSynopsis();
        // build usage
        $help['usage:'] = \sprintf(
            '%s %s %s',
            $this->getScriptName(),
            $this->getCommandName(),
            $help['usage:']
        );
        // align global options
        $help['global options:'] = FormatUtil::alignOptions(Application::getGlobalOptions());

        if (empty($help[0]) && $this->isAlone()) {
            $help[0] = self::getDescription();
        }

        if (empty($help[0])) {
            $help[0] = 'No description message for the command';
        }

        // output description
        $this->write(\ucfirst($help[0]) . \PHP_EOL);
        unset($help[0]);

        $this->output->mList($help, ['sepChar' => '  ']);
        return true;
    }
718896
public function colorCheckCommand(): void
    {
        // $char= '❤';
        // $ret = ProcessUtil::run('echo ❤');
        // var_dump($ret, trim($ret[1]), $char === trim($ret[1]));
        //
        // die;

        $this->output->aList([
            'basic color output?' => Cli::isSupportColor() ? '<info>Y</info>' : 'N',
            'ansi char output?'   => Cli::isAnsiSupport() ? 'Y' : 'N',
            '256 color output?'   => Cli::isSupport256Color() ? 'Y' : 'N',
            'font symbol output?' => Cli::isSupport256Color() ? 'Y' : 'N',
        ], 'color support check');
    }
1335031
def ls_cmd(argv):
    """"""
    parser = argparse.ArgumentParser()
    p_group = parser.add_mutually_exclusive_group()
    p_group.add_argument('-b', '--brief', action='store_false')
    p_group.add_argument('-l', '--long', action='store_true')
    args = parser.parse_args(argv)
    lsvirtualenv(args.long)
971039
public static function writeHelp() {
		
		/*
		
		The generic help follows this format:
		
		Pattern Lab Console Options
		
		Usage:
		  php core/console command [options]
		
		Available commands:
		  --build   (-b)    Build Pattern Lab
		  --watch   (-w)    Build Pattern Lab and watch for changes and rebuild as necessary
		  --version (-v)    Display the version number
		  --help    (-h)    Display this help message.
		
		*/
		
		// find length of longest command
		$lengthLong = 0;
		foreach (self::$commands as $command => $attributes) {
			$lengthLong = ($attributes["commandLongLength"] > $lengthLong) ? $attributes["commandLongLength"] : $lengthLong;
		}
		
		// write out the generic usage info
		self::writeLine("");
		self::writeLine("<h1>Pattern Lab Console Options</h1>",true,true);
		self::writeLine("<h2>Usage</h2>:",true,true);
		self::writeLine("  php ".self::$self." command <optional>[options]</optional>",true,true);
		self::writeLine("<h2>Available commands</h2>:",true,true);
		
		// write out the commands
		foreach (self::$commands as $command => $attributes) {
			$spacer = self::getSpacer($lengthLong,$attributes["commandLongLength"]);
			self::writeLine("  --".$attributes["commandLong"].$spacer."  <desc>".$attributes["commandDesc"]."</desc>",true);
		}
		
		// write out how to get more help
		self::writeLine("");
		self::writeLine("<h2>Get options for a specific command:</h2>",true,true);
		self::writeLine("  php ".self::$self." --help --command",true);
		
		self::writeLine("");
		
	}
600697
def list_commands(self, ctx):
        """"""
        commands = super(LegitGroup, self).list_commands(ctx)
        return [cmd for cmd in order_manually(commands)]
742382
def help(self, command=None):
    '''

    '''
    from spython.utils import check_install
    check_install()

    cmd = ['singularity','--help']
    if command != None:
        cmd.append(command)
    help = self._run_command(cmd)
    return help
1037900
function help() {
    var padBtm = [0, 0, 1, 0];
    var msg = ' See additional required/optional arguments for each command below. \n';
    pargv
        .logo('Mustr', 'cyan')
        .ui(95)
        .join(chalk.magenta('Usage:'), 'mu', chalk.cyan('<cmd>'), '\n')
        .div({ text: chalk.bgBlue.white(msg) })
        .div({ text: chalk.cyan('help, h'), width: 35, padding: padBtm }, { text: chalk.gray('displays help and usage information.'), width: 40, padding: padBtm })
        .div({ text: chalk.cyan('init, i'), width: 35, padding: padBtm }, { text: chalk.gray('initialize the application for use with Mustr.'), width: 40, padding: padBtm })
        .div({ text: chalk.cyan('generate, g') + " " + chalk.white('<template>') + " " + chalk.magenta('[output]'), width: 35, padding: padBtm }, { text: chalk.gray('generates and renders a template.'), width: 40, padding: padBtm })
        .div({ text: chalk.white('<template>'), width: 35, padding: [0, 2, 0, 2] }, { text: chalk.gray('template to generate and compile.'), width: 40 }, { text: chalk.red('[required]'), align: 'right' })
        .div({ text: chalk.white('[output]'), width: 35, padding: [0, 2, 0, 2] }, { text: chalk.gray('output name/path for template'), width: 40, padding: padBtm })
        .div({ text: chalk.cyan('rollback, r') + " " + chalk.white('<name/id>') + " " + chalk.magenta('[output]'), width: 35, padding: padBtm }, { text: chalk.gray('Rolls back a template or component.'), width: 40, padding: padBtm })
        .div({ text: chalk.white('<name/id>'), width: 35, padding: [0, 2, 0, 2] }, { text: chalk.gray('the rollback id, index or template name.'), width: 40 })
        .div({ text: chalk.white('[output]'), width: 35, padding: [0, 2, 0, 2] }, { text: chalk.gray('output name/path for template'), width: 40, padding: padBtm })
        .div({ text: chalk.cyan('show, s') + " " + chalk.white('<type>'), width: 35, padding: padBtm }, { text: chalk.gray('shows details/stats for the given type.'), width: 40, padding: padBtm })
        .div({ text: chalk.white('<type>'), width: 35, padding: [0, 2, 0, 2] }, { text: chalk.gray('currently there is only one type "rollbacks"'), width: 40 })
        .show();
}
508130
def _get_command(self):
        """"""
        targets = ' '.join(self.targets)
        cmd_str = self._linter.command_with_options + ' ' + targets
        cmd_shlex = shlex.split(cmd_str)
        return list(cmd_shlex)
212257
public function helpAction()
    {
        $args = $this->getRequest()->getArgv();
        $command = !empty($args[2]) ? $args[2] : 'help';

        return $this->help($command);
    }
1013538
public function getHelp()
    {
        print Color::head('Help:') . PHP_EOL;
        print Color::colorize('  Lists the commands available in Console') . PHP_EOL . PHP_EOL;

        $this->run([]);
    }