feat(falyx): add persistent prompt history, multiline input support, and new enum tests
- Added `enable_prompt_history` & `prompt_history_base_dir` to Falyx, using FileHistory to persist inputs to `~/.{program}_history` - Added `multiline` option to UserInputAction and passed through to PromptSession - Updated examples (`argument_examples.py`, `confirm_example.py`) to enable prompt history and add TLDR examples - Improved CLI usage tips for clarity (`[COMMAND]` instead of `[KEY]`) - Added `test_action_types.py` and expanded `test_main.py` for init and parser coverage - Bumped version to 0.1.76
This commit is contained in:
@ -82,6 +82,7 @@ flx = Falyx(
|
||||
program="argument_examples.py",
|
||||
hide_menu_table=True,
|
||||
show_placeholder_menu=True,
|
||||
enable_prompt_history=True,
|
||||
)
|
||||
|
||||
flx.add_command(
|
||||
|
@ -101,10 +101,16 @@ def dog_config(parser: CommandArgumentParser) -> None:
|
||||
lazy_resolver=False,
|
||||
help="List of dogs to process.",
|
||||
)
|
||||
parser.add_tldr_examples(
|
||||
[
|
||||
("max", "Process the dog named Max"),
|
||||
("bella buddy max", "Process the dogs named Bella, Buddy, and Max"),
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
async def main():
|
||||
flx = Falyx("Save Dogs Example")
|
||||
flx = Falyx("Save Dogs Example", program="confirm_example.py")
|
||||
|
||||
flx.add_command(
|
||||
key="D",
|
||||
|
Reference in New Issue
Block a user