MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / macro_arg_complete

Method macro_arg_complete

cmd2/cmd2.py:3926–3943  ·  view source on GitHub ↗

Completes arguments to a macro. Its default behavior is to call path_complete, but you can override this as needed. :param text: the string prefix we are attempting to match (all matches must begin with it) :param line: the current input line with leading whitespace removed

(
        self,
        text: str,
        line: str,
        begidx: int,
        endidx: int,
    )

Source from the content-addressed store, hash-verified

3924 #############################################################
3925
3926 def macro_arg_complete(
3927 self,
3928 text: str,
3929 line: str,
3930 begidx: int,
3931 endidx: int,
3932 ) -> Completions:
3933 """Completes arguments to a macro.
3934
3935 Its default behavior is to call path_complete, but you can override this as needed.
3936
3937 :param text: the string prefix we are attempting to match (all matches must begin with it)
3938 :param line: the current input line with leading whitespace removed
3939 :param begidx: the beginning index of the prefix text
3940 :param endidx: the ending index of the prefix text
3941 :return: a Completions object
3942 """
3943 return self.path_complete(text, line, begidx, endidx)
3944
3945 # Top-level parser for macro
3946 @staticmethod

Callers

nothing calls this directly

Calls 1

path_completeMethod · 0.95

Tested by

no test coverage detected