def init3(self): """ a variation of initializing """ com_tree1 = tree.generate_tree("command can") com_tree2 = tree.generate_tree("create") com_tree3 = tree.CommandHead() com_tree3.add_child(com_tree2) com_tree3.add_child(com_tree1) command_param = { "create": ["--funtimes", "-f", '--fun', "--helloworld"], } completable_param = ["--helloworld", "--funtimes", "-f", '--fun'] param_descript = { "create -f": "There is no work life balance, it's just your life", "create --funtimes": "There is no work life balance, it's just your life", "create --fun": "There is no work life balance, it's just your life" } same_param_doubles = { "create": [set(["-f", "--funtimes", '--fun']), set(['--unhap', '-u'])] } command_description = {"create": '', "command can": ''} commands = _Commands(command_tree=com_tree3, command_param=command_param, completable_param=completable_param, param_descript=param_descript, same_param_doubles=same_param_doubles, descrip=command_description) self.completer = _build_completer(commands, global_params=False)
def init2(self): """ a variation of initializing """ com_tree1 = tree.generate_tree("command can") com_tree2 = tree.generate_tree("create") com_tree3 = tree.CommandHead() com_tree3.add_child(com_tree2) com_tree3.add_child(com_tree1) command_param = { "create": ["-funtime"], } completable_param = [ "-helloworld", "-funtime" ] param_descript = { "create -funtime": "There is no work life balance, it's just your life" } command_description = { "create": '', "command can": '' } commands = _Commands( command_tree=com_tree3, command_param=command_param, completable_param=completable_param, param_descript=param_descript, descrip=command_description ) self.completer = AzCompleter(commands, global_params=False)
def init4(self): """ a variation of initializing """ com_tree1 = tree.generate_tree("createmore can") com_tree2 = tree.generate_tree("create") com_tree3 = tree.CommandHead() com_tree3.add_child(com_tree2) com_tree3.add_child(com_tree1) command_param = { "create": ["--funtimes", "-f", "--helloworld"], } completable_param = ["--helloworld", "--funtimes", "-f"] param_descript = { "create -f": "There is no work life balance, it's just your life", "create --funtimes": "There is no work life balance, it's just your life" } same_param_doubles = {"-f": "--funtimes", "--funtimes": '-f'} command_description = {"create": '', "createmore can": ''} commands = _Commands(command_tree=com_tree3, command_param=command_param, completable_param=completable_param, param_descript=param_descript, same_param_doubles=same_param_doubles, descrip=command_description) self.completer = AzCompleter(commands, global_params=False, outstream=six.StringIO())
def init1(self): """ a variation of initializing """ com_tree1 = tree.generate_tree("command can") com_tree2 = tree.generate_tree("create") com_tree3 = tree.CommandHead() com_tree3.add_child(com_tree2) com_tree3.add_child(com_tree1) commands = _Commands(command_tree=com_tree3) self.completer = AzCompleter(commands)
def init1(self): """ a variation of initializing """ com_tree1 = tree.generate_tree("command can") com_tree2 = tree.generate_tree("create") com_tree3 = tree.CommandHead() com_tree3.add_child(com_tree2) com_tree3.add_child(com_tree1) command_description = {"create": '', "command can": ''} commands = _Commands(command_tree=com_tree3, descrip=command_description) self.completer = _build_completer(commands, global_params=False)