feat: enhance help command UX, completions, and CLI tips
- Expanded help command to accept: - `-k/--key` for detailed help on a specific command - `-t/--tag` for tag-filtered listings - `-T/--tldr` for quick usage examples - Updated TLDR flag to support `-T` short form and refined help text. - Improved `_render_help()` to show contextual CLI tips after help or TLDR output. - Adjusted completer to yield both upper and lower case completions without mutating the prefix. - Standardized CLI tip strings in root/arg parsers to reference `help` and `preview` subcommands instead of menu `run ?` syntax. - Passed `options_manager` to history/help/exit commands for consistency. - Allowed `help_command` to display TLDR examples when invoked without a key. - Added test assertions for help command key/alias consistency. - Bumped version to 0.1.82.
This commit is contained in:
@ -6,6 +6,8 @@ from falyx import Falyx
|
||||
@pytest.mark.asyncio
|
||||
async def test_help_command(capsys):
|
||||
flx = Falyx()
|
||||
assert flx.help_command.arg_parser.aliases[0] == "HELP"
|
||||
assert flx.help_command.arg_parser.command_key == "H"
|
||||
await flx.run_key("H")
|
||||
|
||||
captured = capsys.readouterr()
|
||||
|
Reference in New Issue
Block a user