Skip to content

Commit 1e62cb4

Browse files
committed
;examples: hledger.conf updates
1 parent 0e57087 commit 1e62cb4

File tree

2 files changed

+50
-24
lines changed

2 files changed

+50
-24
lines changed

hledger.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# An empty hledger.conf to disable user's personal config in this directory and below.
2-
# See also: hledger.conf.sample
1+
# This is an empty config file, to disable your personal hledger config
2+
# while you are building/testing hledger. See hledger.conf.sample instead.

hledger.conf.sample

Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,64 @@
1-
#!/usr/bin/env -S hledger --conf
2-
# hledger.conf - extra options(/arguments) to be added to hledger commands.
3-
# This can be placed in current dir or above, or ~/.hledger.conf, or ~/.config/hledger/,
4-
# or specified with --conf, or executed with a shebang line like the above.
1+
# An example hledger config file, for you to customise.
2+
# This declares extra options/arguments to be added to your hledger commands.
3+
# Save as ~/.hledger.conf, or ~/.config/hledger/hledger.conf, or hledger.conf
4+
# in or above your current directory, and hledger will use it automatically.
5+
#
6+
# Be careful about what you put in your default config file.
7+
# It changes hledger's behaviour, so it's easy to confuse yourself,
8+
# disrupt reports, or break scripts/applications which use hledger.
9+
# If a command is not working as expected, add --debug to troubleshoot.
10+
# To avoid using any config file, run hledger with -n/--no-conf.
11+
#
12+
# You can also choose a config file with --conf, or add a shebang line (eg
13+
# #!/usr/bin/env -S hledger --conf) to config files and run them like scripts.
514

6-
# Options/arguments for all commands (which support them):
715

8-
# don't check balance assertions by default (run with -s to check them)
16+
# 1. General options. These will be used with all commands which support them.
17+
18+
# Show prettier tables in reports.
19+
--pretty
20+
21+
# Don't check balance assertions by default. (When you're ready to check them,
22+
# run with -s, or run hledger check assertions.)
923
--ignore-assertions
1024

11-
# always infer these
25+
# Always infer these things:
1226
--infer-costs
1327
--infer-equity
1428
--infer-market-prices
1529

16-
# always show prettier tables in terminal reports
17-
--pretty
18-
1930

20-
# Options/arguments for specific commands:
31+
# 2. Command-specific options.
2132

2233
[print]
2334
--explicit # show missing amounts
2435
--show-costs # show costs
2536

26-
# [help] --man # prefer man over info
37+
[help]
38+
--man # if you prefer man over info
39+
40+
# Set your preferred options for the balance commands.
41+
# You can override config file options by adding more on the command line.
42+
[balance] --tree --depth 3 -b '3 months ago'
43+
[balancesheet] --tree --depth 3 -b '3 months ago'
44+
[balancesheetequity] --tree --depth 3 -b '3 months ago'
45+
[cashflow] --tree --depth 3 -b '3 months ago'
46+
[incomestatement] --tree --depth 3 -b '3 months ago'
47+
48+
# You can set options/arguments for addon commands too (when started by
49+
# `hledger CMD`). The -- argument needed at command line is not needed here.
50+
51+
# Some defaults for hledger-ui: start in the Cash accounts screen,
52+
# watch for file changes, set a depth limit, hide zeros and equity accounts.
53+
[ui] --cash --watch -3 -E not:type:e
54+
55+
[web] --port 5050 --allow edit
2756

28-
# balance commands: use these defaults
29-
[balance] --tree -p 'monthly from 3 months ago' --depth 3
30-
[balancesheet] --tree -p 'monthly from 3 months ago' --depth 3
31-
[balancesheetequity] --tree -p 'monthly from 3 months ago' --depth 3
32-
[cashflow] --tree -p 'monthly from 3 months ago' --depth 3
33-
[incomestatement] --tree -p 'monthly from 3 months ago' --depth 3
57+
[iadd] --date-format %Y-%m-%d
3458

35-
# hledger-ui (when started via `hledger ui`):
36-
# start in Cash accounts screen, limited to depth 3, and watch for changes.
37-
# The -- argument needed on the command line is not needed here.
38-
[ui] --cash -3 --watch
59+
#[interest]
60+
# --annual 0.05
61+
# --30-360
62+
# --source SRCACCT
63+
# --target DSTACCT
64+
# ACCT

0 commit comments

Comments
 (0)