def __init__(self, manager): parser = NullCommandParser(prog = PLUGIN_COMMAND, description = self.__doc__) parser.add_command(callback = self.callback) FileInstaller.__init__(self, manager, PLUGIN_COMMAND, parser, PLUGIN_DIR) return
def __init__(self, manager): parser = NullCommandParser(prog = BASH_UTILS_COMMAND, description = self.__doc__) parser.add_command(callback = self.callback, narg = 0) FileInstaller.__init__(self, manager, BASH_UTILS_COMMAND, parser, BASH_UTILS_DIR) return
def __init__(self, manager): parser = NullCommandParser(prog = GEN_BASH_COMPLETION_COMMAND, description = self.__doc__) parser.add_command(callback = self.callback, narg = 1, completion_policies = [FileCompletionPolicy()]) KasabakeCommandPlugin.__init__(self, manager, GEN_BASH_COMPLETION_COMMAND, parser, GEN_BASH_COMPLETION_DIR) return
def __init__(self, manager): parser = NullCommandParser(prog = DESCRIBE_PLUGIN_COMMAND, description = self.__doc__, usage = """%prog [options] plugin-name""") parser.add_option("-P", "--no-path", action = "store_true", dest = "no_path", default = False, help = """does not print the path where \ the plugin installed""") parser.add_option("-U", "--no-usage", action = "store_true", dest = "no_usage", default = False, help = """does not print the usage of the plugin""") parser.add_option("-N", "--no-nanme", action = "store_true", dest = "no_name", default = False, help = """does not print the name of the plugin""") parser.add_option("-o", "--options", action = "store_true", dest = "options", default = False, help = "print the list of options") parser.add_option("--no-arg-options", action = "store_true", dest = "no_arg_options", default = False, help = """only print the options does not require \ arguments. this options is valid if you call with -o option.""") parser.add_option("--arg-options", action = "store_true", dest = "arg_options", default = False, help = """only print the options require \ arguments. this options is valid if you call with -o option.""") list_plugins = InvokeCommandCompletionPolicy("kasabake list-commands -s") parser.add_command(callback = self.callback, narg = 1, completion_policies = [list_plugins]) KasabakeCommandPlugin.__init__(self, manager, DESCRIBE_PLUGIN_COMMAND, parser, DESCRIBE_PLUGIN_DIR) return