Add PromptMenuAction, add cancel button to SelectionAction, make get_command async, add Action validation and defauilt nargs to None.

This commit is contained in:
2025-05-24 12:29:16 -04:00
parent b0c0e7dc16
commit ddb78bd5a7
16 changed files with 480 additions and 180 deletions

View File

@ -2,6 +2,7 @@ import asyncio
from falyx.action import SelectionAction
from falyx.selection import SelectionOption
from falyx.signals import CancelSignal
selections = {
"1": SelectionOption(
@ -23,4 +24,7 @@ select = SelectionAction(
show_table=True,
)
print(asyncio.run(select()))
try:
print(asyncio.run(select()))
except CancelSignal:
print("Selection was cancelled.")