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

Method complete_help_command

cmd2/cmd2.py:4210–4216  ·  view source on GitHub ↗

Completes the command argument of help.

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

Source from the content-addressed store, hash-verified

4208 self.perror(f"Macro '{name}' not found")
4209
4210 def complete_help_command(self, text: str, line: str, begidx: int, endidx: int) -> Completions:
4211 """Completes the command argument of help."""
4212 # Complete token against topics and visible commands
4213 topics = set(self.get_help_topics())
4214 visible_commands = set(self.get_visible_commands())
4215 strs_to_match = list(topics | visible_commands)
4216 return self.basic_complete(text, line, begidx, endidx, strs_to_match)
4217
4218 def complete_help_subcommands(
4219 self, text: str, line: str, begidx: int, endidx: int, arg_tokens: Mapping[str, Sequence[str]]

Callers

nothing calls this directly

Calls 3

get_help_topicsMethod · 0.95
get_visible_commandsMethod · 0.95
basic_completeMethod · 0.95

Tested by

no test coverage detected