diff options
| author | Danilo M. <danix@danix.xyz> | 2026-06-30 15:09:34 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-06-30 15:09:34 +0200 |
| commit | 9c15e172eb5b50796eb050cc5704471bce09e024 (patch) | |
| tree | 01433901ddd2bb8db3f2498a225c49faae26d295 /firefly_cli/commands/account.py | |
| parent | 93dbbe18e934d87ebf6ae6c614bb26f0e9e5afa5 (diff) | |
| download | firefly-cli-19d82d1532fb2497ce7c401a00bcb50a58f95f3c.tar.gz firefly-cli-19d82d1532fb2497ce7c401a00bcb50a58f95f3c.zip | |
help, completion: descriptive help text and bash completionv0.2.1
Add group/leaf descriptions to argparse help and richer command help
strings. Add generated bash completion (completions/firefly.bash) plus
its generator (scripts/gen_completion.py), wired into the command
checklist in CLAUDE.md and documented in the README. Bump to 0.2.1.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'firefly_cli/commands/account.py')
| -rw-r--r-- | firefly_cli/commands/account.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/firefly_cli/commands/account.py b/firefly_cli/commands/account.py index 0e86b2b..9dbfab6 100644 --- a/firefly_cli/commands/account.py +++ b/firefly_cli/commands/account.py @@ -9,7 +9,7 @@ _CREATE_TYPES = ("asset", "expense", "revenue") def _list_args(p): p.add_argument("--type", help="filter: asset, expense, revenue, liability, ...") -@registry.command("account list", help="list accounts", args=_list_args) +@registry.command("account list", help="list accounts; optionally filter by --type", args=_list_args) def cmd_list(args, ctx): params = {"type": args.type} if getattr(args, "type", None) else None resp = ctx.client.request("GET", "/api/v1/accounts", params=params) @@ -24,7 +24,7 @@ def _create_args(p): help="initial balance (asset accounts); dated today") p.add_argument("--currency", default=None, help="currency code, e.g. EUR") -@registry.command("account create", help="create an account", args=_create_args) +@registry.command("account create", help="create an asset, expense, or revenue account", args=_create_args) def cmd_create(args, ctx): if args.type not in _CREATE_TYPES: raise FireflyError( @@ -46,13 +46,13 @@ def cmd_create(args, ctx): def _name_arg(p): p.add_argument("account", help="account name or id") -@registry.command("account get", help="show one account", args=_name_arg) +@registry.command("account get", help="show full details for one account (name or id)", args=_name_arg) def cmd_get(args, ctx): acc = ctx.resolver.account(args.account) output.emit(acc, human=ctx.human) return 0 -@registry.command("account balance", help="show account balance", args=_name_arg) +@registry.command("account balance", help="show current balance for one account (name or id)", args=_name_arg) def cmd_balance(args, ctx): acc = ctx.resolver.account(args.account) output.emit({"id": acc["id"], "name": acc.get("name"), |
