Misc cli changes #1

Merged
oysteikt merged 5 commits from misc-cli-changes into main 2024-05-17 23:06:35 +02:00
Showing only changes of commit e270ac2a4f - Show all commits

View File

@ -58,6 +58,7 @@ class InteractiveItemSelector(Cmd):
self.execute_selection = execute_selection self.execute_selection = execute_selection
self.complete_selection = complete_selection self.complete_selection = complete_selection
self.default_item = default self.default_item = default
self.result = None
if default is not None: if default is not None:
self.prompt = f'Select {cls.__name__} [{default.name}]> ' self.prompt = f'Select {cls.__name__} [{default.name}]> '
@ -197,6 +198,7 @@ class NumberedItemSelector(NumberedCmd):
super().__init__() super().__init__()
self.items = items self.items = items
self.stringify = stringify self.stringify = stringify
self.result = None
self.funcs = { self.funcs = {
i: { i: {
'f': self._select_item, 'f': self._select_item,