diff --git a/docs/shell.rst b/docs/shell.rst index 58588a2c..fcc171bd 100644 --- a/docs/shell.rst +++ b/docs/shell.rst @@ -143,7 +143,12 @@ Deactivate the currently selected file. This used to be called INVALIDATE in TS activate_file ~~~~~~~~~~~~~ -Activate the currently selected file. This used to be called REHABILITATE in TS 11.11. +Activate the specified file. This used to be called REHABILITATE in TS 11.11. +You need to specify the name or FID of the file to activate. + +.. argparse:: + :module: pySim-shell + :func: Iso7816Commands.activate_file_parser open_channel ~~~~~~~~~~~~ diff --git a/pySim-shell.py b/pySim-shell.py index ad76ba01..ec417c78 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -805,13 +805,15 @@ class Iso7816Commands(CommandSet): self._cmd.poutput("CHV enable successful") def do_deactivate_file(self, opts): - """Deactivate the current EF""" + """Deactivate the currently selected EF""" (data, sw) = self._cmd.card._scc.deactivate_file() + activate_file_parser = argparse.ArgumentParser() + activate_file_parser.add_argument('NAME', type=str, help='File name or FID of file to activate') + @cmd2.with_argparser(activate_file_parser) def do_activate_file(self, opts): """Activate the specified EF""" - path = opts.arg_list[0] - (data, sw) = self._cmd.rs.activate_file(path) + (data, sw) = self._cmd.rs.activate_file(opts.NAME) def complete_activate_file(self, text, line, begidx, endidx) -> List[str]: """Command Line tab completion for ACTIVATE FILE"""