Commit Graph

2151 Commits

Author SHA1 Message Date
Simon Michael
1e9bd3c2c9 ;doc:add: edits 2025-06-13 12:26:34 -10:00
Simon Michael
3b1bd92cf2 ;doc: add: balance assignments: mention -I [#2406] 2025-06-13 10:29:23 -10:00
Simon Michael
3713a1b77b ;fix:doc:add: document balance assertions/assignments behaviour [#2406] 2025-06-13 07:36:45 -10:00
Simon Michael
57031b0e78 dev: rename exitOnError -> handleExit, improve doc 2025-06-12 18:48:10 -10:00
Simon Michael
de4d637def dev: transaction balancing: cleanup [#2402] 2025-06-12 17:55:13 -10:00
Simon Michael
bf90b20f2c imp: --txn-balancing flag to select transaction balancing precision [#2402] 2025-06-12 17:55:13 -10:00
Simon Michael
001a0b9572 fix:areg: round all amounts to display precision again [#2407]
This broke in 1.32.
2025-06-12 17:55:13 -10:00
Simon Michael
fcb1b4ed1c imp:cli: simplify flag group titles 2025-06-04 15:25:27 -10:00
Simon Michael
8498894a96 ;doc: update command docs 2025-06-04 07:54:03 -10:00
Simon Michael
2a4718d40a fix: make a few more error messages consistent, hiding call stack [#2367] 2025-06-03 10:10:04 -10:00
Michael Rees
19a2a70f2d Handle partial dates in added transactions 2025-05-31 23:19:47 -10:00
Michael Rees
b042115692 Ignore assertions during add with -I 2025-05-31 23:19:47 -10:00
Michael Rees
5a4aa87df8 Clarify some code after review 2025-05-31 23:19:47 -10:00
Michael Rees
17f914e571 imp: add: Verify balance assertions on each posting (#2355) 2025-05-31 23:19:47 -10:00
Simon Michael
b7dbe3ed4f ;fix:doc: more text encoding corrections (#2394) 2025-05-30 12:11:15 -10:00
Simon Michael
f1f1ad5c94 ;dev: clarify 2025-05-30 10:48:24 -10:00
Dmitry Astapov
f38bc34d35 lib: roi: fix a bug with PnL attributed to the wrong period (fixes #2391) 2025-05-26 19:54:21 -10:00
Simon Michael
820a44eb07 imp:lib:Hledger.Utils.Debug: simpler, more consistent dbg* names 2025-05-21 22:54:00 -10:00
Simon Michael
f7aa1fadd1 fix:test: fix and improve pass-through of arguments to tasty [#2386] 2025-05-16 10:46:50 -10:00
Simon Michael
59ff2a9542 ;doc: fix broken "Commodity display style" links [hledger_site/#132]
Followup to jbrains' fix in https://github.com/simonmichael/hledger_site/pull/132.
2025-05-10 10:43:28 -10:00
Simon Michael
9365084b06 ;dev: setup: notes 2025-05-09 15:39:06 -10:00
Simon Michael
0298918be2 ;doc: setup 2025-04-25 16:14:03 -10:00
Simon Michael
144489a418 imp: setup: improve output 2025-04-25 15:21:59 -10:00
Simon Michael
bf40d28c8b imp: config files (and maybe timedot files) no longer require a final newline 2025-04-25 13:59:18 -10:00
Simon Michael
8f46eca6ec imp:setup: improve output and logic; show strictness config 2025-04-25 13:58:36 -10:00
Simon Michael
45e449e97a imp:setup: show more green for ideal setups 2025-04-25 12:04:06 -10:00
Simon Michael
4a5b0d46b5 imp: setup v2, simpler implementation and shorter output
This one tests only with the currently running hledger, and requires being installed in PATH to show full info.
2025-04-25 11:53:57 -10:00
Simon Michael
78baaee6c5 lib: more version helpers, rename to HledgerBinaryInfo, silence warnings 2025-04-25 09:36:38 -10:00
Simon Michael
06cd0f9472 lib: exitOnExceptions -> exitOnError 2025-04-25 08:32:47 -10:00
Simon Michael
d1e4d00b8d lib: Cli,UI,WebOptions: export binaryinfo 2025-04-25 08:26:14 -10:00
Simon Michael
d3af9f0217 ;doc:check: edits 2025-04-24 11:27:28 -10:00
Simon Michael
d37000726d ;doc:check: edits 2025-04-24 11:13:29 -10:00
Simon Michael
650901901f ;doc:check: edits 2025-04-24 10:53:44 -10:00
Simon Michael
0d6023b812 ;doc:balance: edits 2025-04-24 09:59:27 -10:00
Simon Michael
8705b935de imp:setup: output tweaks 2025-04-23 22:50:19 -10:00
Simon Michael
eec803f19b imp:setup: more setup tests; improve logic, output 2025-04-23 21:43:30 -10:00
Simon Michael
03589e294b lib: make getConf total; add getConf' 2025-04-23 21:43:30 -10:00
Simon Michael
6cf40a76d1 lib: parseHledgerVersion: also save the package version as text 2025-04-23 11:00:49 -10:00
Simon Michael
cd6288a8eb imp:setup: output tweaks 2025-04-22 19:12:16 -10:00
Simon Michael
b0b081f20d imp:setup: check account type declarations
Begin analysing account type declarations (finally).
Setting up account types when getting started is just a bit too complicated
to be easily understood or easily documented.
Making that easy is one of the goals for the setup command.
2025-04-22 19:02:05 -10:00
Simon Michael
f39b34184e lib: and setup: robust parsing of hledger --version output 2025-04-22 17:02:44 -10:00
Simon Michael
2288f5193d fix:setup: refactor, fix a case not returning installed version 2025-04-22 09:06:27 -10:00
Simon Michael
6b5be96d27 imp:setup: improve config file tests, run only when supported 2025-04-22 08:53:43 -10:00
Simon Michael
4529a8c4a1 imp: setup: smarter logic, more robustness
- Test the hledger in PATH, not the one running
- Handle old hledger versions as well as recent ones
- Handle errors, remove early terminations
2025-04-21 15:31:23 -10:00
Simon Michael
5334e7924b lib: Hledger.Cli.Version: rename PackageVersionString, more helpers 2025-04-21 15:14:12 -10:00
Simon Michael
50a85fc5ca dev: setup: cleanup 2025-04-20 16:13:28 -10:00
Simon Michael
f0ff2aa34e imp: setup: show full --version output 2025-04-20 10:52:50 -10:00
Simon Michael
c3c91448a7 imp: setup: output tweaks 2025-04-20 10:52:50 -10:00
Simon Michael
a18a4c612d imp: setup: get version from hledger.org, hackage is down 2025-04-20 10:52:50 -10:00
Simon Michael
580bc0a8f8 dev: setup: refactor output helpers 2025-04-20 10:52:50 -10:00
Simon Michael
8b48fc41bc imp: setup: version check: improve error output when unknown 2025-04-20 10:52:50 -10:00
Simon Michael
97e2e8572f imp: setup: version check: add a timeout, improve error output 2025-04-20 10:52:50 -10:00
Simon Michael
15173eeeb0 imp: setup: test default file setup 2025-04-20 10:52:50 -10:00
Simon Michael
4881a0deaa ;doc:setup 2025-04-20 10:52:50 -10:00
Simon Michael
75cd521ed7 imp:setup: drop unused options 2025-04-20 10:52:50 -10:00
Simon Michael
2ef7434f47 imp:setup: check files setup (WIP) 2025-04-20 10:52:50 -10:00
Simon Michael
d408f00b42 imp:setup: use HEAD instead of GET to check current version 2025-04-20 10:52:50 -10:00
Simon Michael
98da9709fc imp:setup: config file tests; tidier more portable color-aware output 2025-04-20 10:52:50 -10:00
Simon Michael
bb7510194e imp: setup: setup ignores the config file itself, for robustness 2025-04-20 10:52:50 -10:00
Simon Michael
daf550bbb0 imp: Hledger.Cli.Conf: refactor, expose more info about config files 2025-04-20 10:52:50 -10:00
Simon Michael
320d197735 imp:setup: more hledger setup tests 2025-04-20 10:52:50 -10:00
Simon Michael
69232cae7a feat: setup: first setup check: is hledger in PATH ? 2025-04-20 10:49:16 -10:00
Simon Michael
cff831c3c0 feat:setup: command skeleton 2025-04-20 10:49:16 -10:00
Simon Michael
29bca306ee ;doc: print: simplify [#2368] 2025-04-18 18:50:41 -10:00
samahri
6bf9369cda imp: add --location tag to print command [#2368]
;fix: delete hledger-print-location, move doc to Print.hs>"print,other features"
2025-04-18 18:49:34 -10:00
samahri
588cab14f3 imp: add --location tag to print command [#2368] 2025-04-18 18:49:34 -10:00
Simon Michael
9340b73aae imp: improve/format errors for various failures [#2367]
These now call error' and show errors in the standard style:

- reading a nonexistent data file
- reading an unsafe dotted file name on windows
- web: using --socket on windows
- demo: demo not found
- demo: error while running asciinema
- diff: bad arguments
- print --match: no match found
- register --match: no match found
- roi: no investment transactions found
2025-04-11 08:06:47 -10:00
Simon Michael
454c669fe4 fix:cli,ui,web: consistent console error output independent of GHC version [#2367]
Hledger.Utils.IO helpers have been updated and new ones have been
added (exitOnExceptions, exitWithError) to allow consistent display of
program errors whether compiled with GHC <9.10, GHC 9.10, or GHC >9.10.
The trailing newlines added by GHC 9.10 are gone,
and so is the "uncaught exception" output added by GHC 9.12.
2025-04-11 08:06:47 -10:00
Michael Rees
62071bc4c2 feat: timeclock: Add support for multiple clocked in sessions (#2141)
We now support having multiple sessions clocked in. These are paired by
account name if given on the out entry, and otherwise an out closes the
most recent in entry.

Note that this breaks some backwards compatibility, in that we
previously ignored the description on the clock out entry. To mitigate
this, a new hidden flag --timeclock-old has been added, which reverts to
the old behavior.
2025-04-03 11:19:18 -10:00
Simon Michael
20226283b8 ;pkg: tweak LICENSE files, try to get github to recognise 2025-03-31 18:18:10 -10:00
Simon Michael
47bb40f838 ;pkg: clean up LICENSE files, main module licensing headers 2025-03-31 18:10:19 -10:00
Stephen Morgan
8474c811c5 imp run: More successful cache hits with forecast
If forecast start and end dates are explicitly requested with
--forecast=, those parts of the reportspan_ can be replaced with the
forecast dates, meaning more successful cache hits.
2025-03-12 20:47:17 -10:00
Simon Michael
6f17d133dd ;imp:cli: improve help for --pretty 2025-03-09 08:16:38 -10:00
Simon Michael
6d47530ebc ;imp:cli: improve help for mutually exclusive valuation flags 2025-03-09 08:16:38 -10:00
Simon Michael
dbb85e3a9f ;doc:balance: "types" -> "modes" 2025-03-08 13:09:02 -10:00
Simon Michael
b31091195b ;doc: update command docs 2025-03-08 12:44:57 -10:00
Simon Michael
02ef6e45e7 imp:cli: make mutually exclusive flags clearer in --help 2025-03-08 12:42:16 -10:00
Dmitry Astapov
9963a01a15 run: do not pre-load journal(s) at the start of "run" [#2345]
wait for the first command to do this. Same for "repl"
2025-03-08 09:55:59 -10:00
Dmitry Astapov
c0b3c932ea ;run: --forecast with changed reporting interval fix (+test) [#2345] 2025-03-08 09:55:59 -10:00
Simon Michael
054e9561e4 ;doc: update command docs 2025-03-07 22:03:09 -10:00
Simon Michael
44a4b79fa4 ;doc:run, repl: more edits 2025-03-07 22:02:14 -10:00
Simon Michael
f153d7f707 ;doc: update command docs 2025-03-07 21:38:10 -10:00
Pranesh Prakash
2369f1338a ;doc:repl: updates
Corrected one small mistake, and changed a few other things for clarity.

Applied changes to the right file (Repl.md) this time.
2025-03-07 21:35:44 -10:00
Pranesh Prakash
fc2aabaab3 ;doc:repl: updates
Corrected one small mistake, and changed a few other things for clarity.
2025-03-07 13:35:26 -10:00
Simon Michael
7a3f69c5a1 ;doc:repl: updates 2025-03-06 19:45:55 -10:00
Dmitry Astapov
a3d2c7bb58 ;run: test that demonstrates caching 2025-03-06 16:43:39 -10:00
Simon Michael
a0cf410a80 ;doc:run, repl: updates 2025-03-06 16:36:54 -10:00
Simon Michael
3d1994ea76 ;doc: add commands, repl, run to Commands section 2025-03-06 16:15:22 -10:00
Simon Michael
0cd86d959e ;doc: update command docs 2025-03-06 16:05:25 -10:00
Simon Michael
cdbbe40e5b ;doc:run, repl: updates and edits 2025-03-06 16:03:55 -10:00
Simon Michael
e9f1e7dbd4 ;doc:demo: mark experimental 2025-03-06 16:03:29 -10:00
Simon Michael
ebf8d25a49 imp:cli: commands list tweaks 2025-03-06 13:58:24 -10:00
Simon Michael
cf81b042be imp:run,repl: allow running addon commands 2025-03-06 13:56:43 -10:00
Simon Michael
a1a6aad873 fix:repl: also catch IO errors like run nosuchfile
And print exceptions consistently, with a single newline.
2025-03-06 13:05:45 -10:00
Simon Michael
9ecc3a56d0 fix:repl: make the run command work in the REPL again
The now-required -- argument was being lost during REPL parsing.
I think this is right, though it's hard to understand.
2025-03-06 13:03:57 -10:00
Simon Michael
fd906bec95 ;dev:cli: debug output tweaks; moveFlagsAfterCommand doc edit 2025-03-06 11:56:21 -10:00
Dmitry Astapov
758335daf0 run: support --man, --info, --tldr 2025-03-06 11:54:00 -10:00
Dmitry Astapov
7fdb2f7fe6 ;run: use leading -- to decide whether to read from files or not 2025-03-06 11:54:00 -10:00
Dmitry Astapov
4dbeac284c ;run: refuse to read commands from stdin if one of the input files was - 2025-03-06 11:54:00 -10:00
Dmitry Astapov
9c63b36d88 ;run: require -- before first command (+test for that) 2025-03-06 11:54:00 -10:00