cli/prompt_utils: clear some bugs

This commit is contained in:
Oystein Kristoffer Tveit 2024-05-17 21:42:53 +02:00
parent fa180ca354
commit 80fafbe3df
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
1 changed files with 2 additions and 0 deletions

View File

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