;examples: hledger.conf.sample: updates

This commit is contained in:
Simon Michael 2024-10-19 18:00:51 -10:00
parent fd4fa512e6
commit 62e1c020cf

View File

@ -1,72 +1,77 @@
# An example hledger config file for you to customise. # Here's a (verbose) hledger config file, providing extra options/arguments.
# This declares extra options/arguments to be added to your hledger commands. # You can try it with --conf CONFFILE, or save it as ~/.hledger.conf
# Save as ~/.hledger.conf, or ~/.config/hledger/hledger.conf, or hledger.conf # (or ~/.config/hledger/hledger.conf, or hledger.conf in/above current directory),
# in or above your current directory, and hledger will use it automatically. # and hledger will use it automatically.
# Or you can choose a config file with --conf. # Note automatic config files are convenient, but it's easy to confuse yourself,
# Or you can turn a config file like this one into a script, by adding # disrupt reports, or break hledger-using scripts/applications.
# a shebang line like `#!/usr/bin/env -S hledger --conf` at the top. # If a command is not working as expected, try it with -n to disable config files,
# # or run it with --debug or --debug=8 to troubleshoot.
# Automatic config files are convenient, but have a cost: it's easy to confuse # https://hledger.org/dev/hledger.html#config-files
# yourself, disrupt reports, or break scripts/applications which use hledger.
# If you choose to use one, be careful about what you put in it.
# If a command is not working as expected, run it with `--debug` to troubleshoot.
# To avoid using a config file, run with `-n` (short for `--no-conf`).
# 1. General options. These will be used with all commands which support them. # 1. General options. These will be used with all commands which support them.
# Show prettier tables in reports. # https://hledger.org/dev/hledger.html#output
# Recommended unless your font doesn't support box drawing characters. # If you need to turn off any of these, I'd like to hear details:
--pretty --pretty # Show prettier tables in reports ? Recommended on most systems.
#--color=no # Disable ANSI color and font styling in the terminal ?
#--pager=no # Disable paging of long output in the terminal ?
# Postpone balance assertions until you use -s or `hledger check assertions`. # Postpone balance assertions until you use -s or `hledger check assertions` ?
# This means there's less need to add -I while piping or fixing problems. # It means less need to add -I while piping or fixing problems.
--ignore-assertions --ignore-assertions # https://hledger.org/hledger.html#balance-assertions
# Always infer these things ? Why not. # Always infer these things ? Why not.
--infer-costs # https://hledger.org/hledger.html#--infer-market-prices-market-prices-from-transactions
# https://hledger.org/hledger.html#equity-conversion-postings
# https://hledger.org/hledger.html#inferring-equity-conversion-postings
--infer-market-prices --infer-market-prices
--infer-costs
#--infer-equity #--infer-equity
# If you use hledger check accounts or hledger check -s with this flag enabled, #
# you may see that some extra account declarations are needed in your journal, like # If you enable --infer-equity and use hledger check accounts or hledger check -s,
# you might need to add account declarations to your journal, something like:
# account equity:conversion:CUR1-CUR2:CUR1 # account equity:conversion:CUR1-CUR2:CUR1
# account equity:conversion:CUR1-CUR2:CUR2 # account equity:conversion:CUR1-CUR2:CUR2
# 2. Command-specific options. # 2. Command-specific options.
# https://hledger.org/hledger.html#print
[print] [print]
--explicit # show inferred amounts --explicit # show inferred amounts
--show-costs # show inferred costs --show-costs # show inferred costs
# https://hledger.org/hledger.html#help
[help] [help]
#--man # if you prefer man over info #--man # if you prefer man over info
# Set your preferred options for the balance commands. # Set some defaults for the balance commands ?
# You can override these by adding more options on the command line. # You can override these by adding more options on the command line.
# [balance] --tree --depth 3 --layout=bare # [balance] --layout=bare --tree --depth 3
# [balancesheet] --tree --depth 3 --layout=bare # [balancesheet] --layout=bare --tree --depth 3
# [balancesheetequity] --tree --depth 3 --layout=bare # [balancesheetequity] --layout=bare --tree --depth 3
# [cashflow] --tree --depth 3 --layout=bare # [cashflow] --layout=bare --tree --depth 3
# [incomestatement] --tree --depth 3 --layout=bare # [incomestatement] --layout=bare --tree --depth 3
# You can also set options for add-on commands (run by `hledger ADDONCMD`). # You can also set options for add-on commands here. This works only if
# The -- argument needed at command line is not needed here. # you run them with hledger (`hledger ui ...`, not `hledger-ui ...`).
# Note they will also respect the general options above
# (hledger-ui and hledger-web will, at least).
# Some defaults for hledger-ui: start in the Cash accounts screen, # https://hledger.org/hledger-ui.html
# watch for file changes, set a depth limit, hide zeros and equity accounts. # Start in the "Cash accounts" screen, with a depth limit,
[ui] --cash --watch -3 -E not:type:e # hiding zeros and equity accounts, and watch for file changes.
# need to repeat this here [ui] --cash -3 -E not:type:e --watch
--ignore-assertions
# https://hledger.org/hledger-web.html
[web] --port 5050 --allow edit [web] --port 5050 --allow edit
# and here
--ignore-assertions
# https://hledger.org/scripts.html#hledger-iadd
[iadd] --date-format %Y-%m-%d [iadd] --date-format %Y-%m-%d
# https://hledger.org/scripts.html#hledger-interest
#[interest] #[interest]
# --annual 0.05 # --annual 0.05
# --30-360 # --30-360