diff --git a/worblehat/cli/main.py b/worblehat/cli/main.py index 2ea1885..288bffd 100644 --- a/worblehat/cli/main.py +++ b/worblehat/cli/main.py @@ -289,7 +289,7 @@ class WorblehatCli(NumberedCmd): 'f': do_abort, 'doc': 'Abort changes', }, - 8: { + 9: { 'f': do_exit, 'doc': 'Exit', }, diff --git a/worblehat/cli/prompt_utils.py b/worblehat/cli/prompt_utils.py index a5eaf46..78f5a0a 100644 --- a/worblehat/cli/prompt_utils.py +++ b/worblehat/cli/prompt_utils.py @@ -147,17 +147,18 @@ class NumberedCmd(Cmd): except (ValueError, KeyError): return - self.funcs[i]['f'](self, arg) + return self.funcs[i]['f'](self, arg) def default(self, arg: str): - self._default(arg) + return self._default(arg) - def _postcmd(self, stop: bool, line: str) -> bool: - print() - print('-----------------') - print() + def _postcmd(self, stop: bool, _: str) -> bool: + if not stop: + print() + print('-----------------') + print() return stop diff --git a/worblehat/cli/subclis/bookcase_item.py b/worblehat/cli/subclis/bookcase_item.py index 485d305..7a3589e 100644 --- a/worblehat/cli/subclis/bookcase_item.py +++ b/worblehat/cli/subclis/bookcase_item.py @@ -74,7 +74,7 @@ class BookcaseItemCli(NumberedCmd): 'f': do_update_data, 'doc': 'Pull updated data from online databases', }, - 4: { + 9: { 'f': do_done, 'doc': 'Done', },