def __init__( self, io_in: IO = stdin, io_err: IO = stderr, io_out: IO = stdout, ps_format: str = '{name}@{terminal}:{path}{ps}{end}', name: str = 'root', term_name: str = 'term', end: str = ' ', ps: str = '$', ) -> None: # those are useless for now self._in = io_in self._err = io_err self._out = io_out # TODO: add config loading self._fs = FS() self._format = ps_format self._name = name self._term_name = term_name self._ps = ps self._end = end self._path: Path = Path(FILE_SYSTEM) self._parser = Parser() self._load_commands()
def setup(parser: Parser) -> None: parser.add_command(Date())
def setup(parser: Parser) -> None: parser.add_command(Touch())
def setup(parser: Parser) -> None: parser.add_command(Exit())
def setup(parser: Parser) -> None: parser.add_command(Forth())
def setup(parser: Parser) -> None: parser.add_command(Help())
def setup(parser: Parser) -> None: parser.add_command(MKDir())
def setup(parser: Parser) -> None: parser.add_command(Sleep())
def setup(parser: Parser) -> None: parser.add_command(Copy())
def setup(parser: Parser) -> None: parser.add_command(PWD())