Add the restore command.

This commit is contained in:
2025-01-17 20:49:28 +02:00
parent 87682a056f
commit b32e5d32b0
6 changed files with 88 additions and 1 deletions
@@ -0,0 +1,4 @@
from .choose_prompt_port import ChoosePromptPort
from .fzf_prompt import ChoosePromptFzf
__all__ = ['ChoosePromptPort', 'ChoosePromptFzf']
@@ -0,0 +1,8 @@
from abc import ABC, abstractmethod
class ChoosePromptPort(ABC):
@staticmethod
@abstractmethod
def choose(iterator) -> str:
pass
@@ -0,0 +1,9 @@
from .choose_prompt_port import ChoosePromptPort
from pyfzf import FzfPrompt
class ChoosePromptFzf(ChoosePromptPort):
@staticmethod
def choose(iterator) -> str:
fzf = FzfPrompt()
return fzf.prompt(iterator)[0]