Esempio n. 1
0
def help_command(**options):
    """
    Prints out help for the commands. 

    salmon help

    You can get help for one command with:

    salmon help -for STR
    """
    if "for" in options:
        help_text = args.help_for_command(salmon.commands, options['for'])
        if help_text:
            print help_text
        else:
            args.invalid_command_message(salmon.commands, exit_on_error=True)
    else:
        print "Available commands:\n"
        print ", ".join(args.available_commands(salmon.commands))
        print "\nUse salmon help -for <command> to find out more."
Esempio n. 2
0
def help_command(**options):
    """
    Prints out help for the commands. 

    salmon help

    You can get help for one command with:

    salmon help -for STR
    """
    if "for" in options:
        help_text = args.help_for_command(salmon.commands, options['for'])
        if help_text:
            print help_text
        else:
            args.invalid_command_message(salmon.commands, exit_on_error=True)
    else:
        print "Available commands:\n"
        print ", ".join(args.available_commands(salmon.commands))
        print "\nUse salmon help -for <command> to find out more."