Simon Michael
3bf0b85084
;tools update issue templates
2025-08-04 09:53:00 +01:00
Simon Michael
ef89b67d7a
dev: accounts: more tag: tests
2025-08-03 07:55:53 +01:00
Simon Michael
cc3923d6d4
imp: the all: query now requires at least one posting
2025-08-03 06:34:00 +01:00
Simon Michael
f604b7a416
fix: accounts: a tag: query only matches account tags, not posting tags
...
Eg, `hledger accounts tag:t` lists only account a from this journal:
account a ; t:
2025-01-01
a 1
b -1 ; t:
2025-08-03 05:38:33 +01:00
Simon Michael
aabc892277
dev: Accounts: import cleanup
2025-08-03 05:37:56 +01:00
Simon Michael
cace7eb491
;doc:areg: clarification
2025-07-30 18:17:58 +01:00
Simon Michael
65463456ed
;pkg:stack912: bump to nightly snapshot
2025-07-28 17:03:35 +01:00
Simon Michael
424e072268
;pkg: bump default build, tools to lts 24.2 / ghc 9.10.2
2025-07-28 17:03:32 +01:00
Simon Michael
e69c72a6c7
dev: include: revert wrong error position fix; refactor
...
Errors in the main file are being reported a few lines too high,
due to the setOffset in includedirectivep.
It seems reverting this should have restored the original bug with
wrong line number in certain include error messages, but I can't find
that right now.
2025-07-28 11:57:46 +01:00
Simon Michael
6521b8dfdb
imp:setup: improve output
2025-07-25 19:08:26 +01:00
Simon Michael
55f12d89e0
;doc:completions: readme edits
2025-07-24 20:09:41 +01:00
Simon Michael
90d4224d5b
;doc:completions: readme edits
2025-07-24 20:02:18 +01:00
Simon Michael
9c3c6a3a5a
;doc:completions: update README
2025-07-24 20:01:03 +01:00
Simon Michael
79fbfb9f5f
dev: Hledger.Utils.Parse: cleanups
2025-07-18 07:31:05 -07:00
Simon Michael
c48c41bcd2
dev:timeclock: cleanups
2025-07-18 07:17:45 -07:00
Simon Michael
94f6f6a9a2
;tools: just test: also run doctests
2025-07-17 14:13:09 -07:00
Simon Michael
4a11474fff
imp: include: better glob patterns, errors, debug output, docs [ #2428 ]
...
The `include` directive has had a number of fixes and improvements. It now has
- more detailed documentation
- more thorough error checking, with clearer and more consistent messages, showing the correct problem line
- more debug output, at levels 6 and 7
- more robust and convenient glob patterns:
- glob patterns always ignore the current file
- `**` can now be used without a following slash, to also match the filename. So if previously you wrote `**/*.j`, now you can just write `**.j`.
- glob patterns now always ignore [dot directories](https://en.wikipedia.org/wiki/Hidden_file_and_hidden_directory )
(such as `.git` directories in a source tree).
The last item is a breaking change.
Previously, a pattern like `**/c.j` would find `a/.b/c.j`, even though it shouldn't.
Fixing this required a trade-off: now no glob pattern can find that file, not even a valid one like `*/.b/c.j`.
Only a literal file path with no wildcards (`a/.b/c.j`) will find it.
We assume excluding dot directories is the more common use case.
If this change breaks your existing files, please report it, and either update them or use the `--old-glob` flag for now.
2025-07-17 12:20:09 -07:00
Simon Michael
d5ff7fe454
;doc: include: mention glob pattern's dot limitation and the --old-glob flag
2025-07-17 08:10:34 -07:00
Simon Michael
b7e35f84a2
imp: include: add hidden --old-glob flag to restore old dot behaviour
...
This disables the workaround for Glob#49, allowing glob patterns to
find dot files and traverse dot directories again (sometimes too much).
2025-07-17 08:00:08 -07:00
Simon Michael
01e0c34b85
dev: Hledger.Utils.IO: getFlag helper, like getOpt
2025-07-17 07:51:05 -07:00
Simon Michael
0ea239503c
dev: rename the hidden --timeclock-old flag to --old-timeclock
...
--timeclock-old is still supported as well, for now, even though
this flag is not documented yet (it has appeared in
changelogs/release notes and in issue discussion).
2025-07-17 07:49:39 -07:00
Simon Michael
c74d8bf6fb
doc: include: update docs
2025-07-16 06:52:19 -07:00
Simon Michael
5ec770badd
imp: include: more flexible **; show the correct line in read errors
2025-07-16 06:52:19 -07:00
Simon Michael
b35dcfda28
imp: include: give a clearer error for trying to include a csv file
...
And note that other read errors may be unclear when occurring in included files.
2025-07-16 06:52:19 -07:00
Simon Michael
8215f19baa
dev: include: cleanup
2025-07-16 06:52:19 -07:00
Simon Michael
3741f9f030
fix: include: report read failures with correct line number
2025-07-16 06:52:19 -07:00
Simon Michael
2dcfe22c89
imp: include: report ** without / as an error, for clarity
2025-07-16 06:52:19 -07:00
Simon Michael
460ae28826
imp: include: globs exclude current file; more cleanup
2025-07-16 06:52:19 -07:00
Simon Michael
b4a1add267
imp: include: more robust tests and glob pattern handling
...
This switches from filepattern back to Glob, which is more powerful.
New notes, implementation, workarounds and tests.
2025-07-16 06:52:19 -07:00
Simon Michael
1046f652b1
dev: PrefixedFilePath cleanups
...
And some helpers that weren't needed after all, but maybe in future
2025-07-16 06:52:19 -07:00
Simon Michael
42b9c8b0fb
dev: consolidate/expand include tests
2025-07-14 17:12:24 -07:00
Simon Michael
28f60bcf92
dev: includedirectivep: refactor
2025-07-11 20:34:50 -07:00
Simon Michael
3a03927018
imp: include: show including file path in debug output
2025-07-11 20:12:13 -07:00
Simon Michael
0add2e90db
imp: include: glob patterns always exclude the current file
...
Eg include **/*.journal is less likely no complain
2025-07-11 19:36:17 -07:00
Simon Michael
08017366b5
imp: file reading: demote some debug=6 output to level 7
2025-07-11 13:48:58 -07:00
Simon Michael
536589e2c2
imp: include: improve cycle and read failure error messages
2025-07-11 13:36:47 -07:00
Simon Michael
b71e001c51
imp: include: more robust ** patterns, and ignore dotted directories
...
** now ignores anything under dotted directories, ie directories whose
name begins with a dot. Eg .git/, foo/.secret/, etc.
Switched from Glob to filepattern lib.
2025-07-11 13:36:47 -07:00
Simon Michael
b1f416dee7
dev: parseIncludedFile: doc cleanup
2025-07-11 13:01:54 -07:00
Simon Michael
b7c4dc3b53
fix:journal: cyclic include error messages now show the correct line
2025-07-11 13:00:51 -07:00
Simon Michael
801a7adaa4
imp:include: better errors, eg for missing argument; more debug output
2025-07-11 12:13:52 -07:00
Simon Michael
c8a5b8eb37
dev: includedirectivep: cleanup
2025-07-11 12:13:12 -07:00
Simon Michael
f5d3b7bd38
fix:journal: include directive error messages now show the correct line
...
They were showing the line after the include directive, confusingly.
2025-07-11 11:55:29 -07:00
Simon Michael
251af8529f
dev: Hledger.Utils.Parse: cleanups
2025-07-11 11:38:50 -07:00
Simon Michael
2815a1865f
dev: includedirectivep: cleanups, docs
2025-07-11 11:38:50 -07:00
Simon Michael
9418807ddc
;doc: include directive: clarify effect, glob limitations
2025-07-11 10:36:57 -07:00
Simon Michael
b23af9275d
imp: simplify bad account type error message
2025-07-09 12:00:13 -07:00
Simon Michael
57b1e18757
imp:demo: show a better error message if asciinema is not installed
2025-07-08 11:35:31 -07:00
Simon Michael
3952d4e611
;dev:cli: update outdated CLI help
2025-07-08 11:35:31 -07:00
jneubrand
7482f1efc3
fix: use precompiled regexes to handle case insensitivity correctly
2025-07-03 14:25:50 -07:00
Simon Michael
31dc8a090e
;doc: Depth: fix typo
2025-07-03 08:22:53 -07:00