| 1 |
from collections.abc import Callable |
| 2 |
from typing import IO, Any, Final |
| 3 |
from typing_extensions import LiteralString |
| 4 |
|
| 5 |
__all__ = ["Cmd"] |
| 6 |
|
| 7 |
PROMPT: Final = "(Cmd) " |
| 8 |
IDENTCHARS: Final[LiteralString] |
| 9 |
|
| 10 |
class Cmd: |
| 11 |
prompt: str |
| 12 |
identchars: str |
| 13 |
ruler: str |
| 14 |
lastcmd: str |
| 15 |
intro: Any | None |
| 16 |
doc_leader: str |
| 17 |
doc_header: str |
| 18 |
misc_header: str |
| 19 |
undoc_header: str |
| 20 |
nohelp: str |
| 21 |
use_rawinput: bool |
| 22 |
stdin: IO[str] |
| 23 |
stdout: IO[str] |
| 24 |
cmdqueue: list[str] |
| 25 |
completekey: str |
| 26 |
def __init__(self, completekey: str = "tab", stdin: IO[str] | None = None, stdout: IO[str] | None = None) -> None: ... |
| 27 |
old_completer: Callable[[str, int], str | None] | None |
| 28 |
def cmdloop(self, intro: Any | None = None) -> None: ... |
| 29 |
def precmd(self, line: str) -> str: ... |
| 30 |
def postcmd(self, stop: bool, line: str) -> bool: ... |
| 31 |
def preloop(self) -> None: ... |
| 32 |
def postloop(self) -> None: ... |
| 33 |
def parseline(self, line: str) -> tuple[str | None, str | None, str]: ... |
| 34 |
def onecmd(self, line: str) -> bool: ... |
| 35 |
def emptyline(self) -> bool: ... |
| 36 |
def default(self, line: str) -> None: ... |
| 37 |
def completedefault(self, *ignored: Any) -> list[str]: ... |
| 38 |
def completenames(self, text: str, *ignored: Any) -> list[str]: ... |
| 39 |
completion_matches: list[str] | None |
| 40 |
def complete(self, text: str, state: int) -> list[str] | None: ... |
| 41 |
def get_names(self) -> list[str]: ... |
| 42 |
|
| 43 |
def complete_help(self, *args: Any) -> list[str]: ... |
| 44 |
def do_help(self, arg: str) -> bool | None: ... |
| 45 |
def print_topics(self, header: str, cmds: list[str] | None, cmdlen: Any, maxcol: int) -> None: ... |
| 46 |
def columnize(self, list: list[str] | None, displaywidth: int = 80) -> None: ... |