2024-05-24 08:57:36 -10:00
|
|
|
# hledger accounts
|
|
|
|
|
|
|
|
> List account names.
|
|
|
|
> More information: <https://hledger.org/hledger.html#accounts>.
|
|
|
|
|
|
|
|
- Show all accounts used or declared in the default journal file:
|
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`hledger {{[acc|accounts]}}`
|
2024-05-24 08:57:36 -10:00
|
|
|
|
|
|
|
- Show accounts used by transactions:
|
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`hledger {{[acc|accounts]}} {{[-u|--used]}}`
|
2024-05-24 08:57:36 -10:00
|
|
|
|
|
|
|
- Show accounts declared with account directives:
|
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`hledger {{[acc|accounts]}} {{[-d|--declared]}}`
|
2024-05-24 08:57:36 -10:00
|
|
|
|
|
|
|
- Add new account directives, for accounts used but not declared, to the journal:
|
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`hledger {{[acc|accounts]}} --undeclared --directives >> {{2024-accounts.journal}}`
|
2024-05-24 08:57:36 -10:00
|
|
|
|
|
|
|
- Show accounts with `asset` in their name, and their declared/inferred types:
|
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`hledger {{[acc|accounts]}} asset --types`
|
2024-05-24 08:57:36 -10:00
|
|
|
|
2024-05-29 22:41:08 -10:00
|
|
|
- Show accounts of the `Asset` type:
|
2024-05-24 08:57:36 -10:00
|
|
|
|
2025-04-22 15:48:30 +03:00
|
|
|
`hledger {{[acc|accounts]}} type:A`
|
2024-05-24 08:57:36 -10:00
|
|
|
|
|
|
|
- Show the first two levels of the accounts hierarchy:
|
|
|
|
|
2025-05-04 10:20:26 +03:00
|
|
|
`hledger {{[acc|accounts]}} {{[-t|--tree]}} {{[-2|--depth 2]}}`
|