1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/hledger-accounts.md
Simon Michael 45168b603d
hledger-*: update pages (#12860)
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
2024-05-30 10:41:08 +02:00

36 lines
821 B
Markdown

# hledger accounts
> List account names.
> More information: <https://hledger.org/hledger.html#accounts>.
- Show all accounts used or declared in the default journal file:
`hledger accounts`
- Show accounts used by transactions:
`hledger accounts --used`
- Show accounts declared with account directives:
`hledger accounts --declared`
- Add new account directives, for accounts used but not declared, to the journal:
`hledger accounts --undeclared --directives >> {{2024-accounts.journal}}`
- Show accounts with `asset` in their name, and their declared/inferred types:
`hledger accounts asset --types`
- Show accounts of the `Asset` type:
`hledger accounts type:A`
- Show the first two levels of the accounts hierarchy:
`hledger accounts --tree --depth 2`
- Short form of the above:
`hledger acc -t -2`