Commit Graph

13509 Commits

Author SHA1 Message Date
Dmitry Astapov
cf05ccb8e4 ;run: comments 2025-03-06 11:54:00 -10:00
Dmitry Astapov
8431cbe95b run: do not try to cache "top-level" journal more than once 2025-03-06 11:54:00 -10:00
Dmitry Astapov
5bd9be2189 run: allow "run" to invoke "run" (fixes #2331) 2025-03-06 11:54:00 -10:00
Dmitry Astapov
88a4b0abae run: support @ARGFILEs (fixes #2330) 2025-03-06 11:54:00 -10:00
Dmitry Astapov
6569714d37 run: cache individual files rather than file groups 2025-03-06 11:54:00 -10:00
Dmitry Astapov
32f286cc35 run: cache all journal files, allow commands to use -f 2025-03-06 11:54:00 -10:00
Simon Michael
aee85df17b ;dev:cli: to help run's command line parsing, double the first -- [#2328]
So that when cmdargs eats it, another remains.
2025-03-06 09:56:25 -10:00
Simon Michael
0b20e11857 ;dev:moveFlagsAfterCommand: doc edits 2025-03-06 07:53:05 -10:00
Simon Michael
e6bf705de0 fix:moveFlagsAfterCommand: don't rearrange things after -- [#2328]
Helps the run command.
2025-03-06 07:25:48 -10:00
Simon Michael
40b40fc2c8 ;dev:moveFlagsAfterCommand: note a problem [#2328] 2025-03-06 06:56:34 -10:00
Simon Michael
d47107ab7a ;dev:readJournal: doc 2025-03-06 05:39:23 -10:00
Simon Michael
874771d47c dev:readJournal: assume default file name "-" rather than "(string)" [#2328]
"-" implies data from standard input so "string" is perhaps more
correct, but I think this is a harmless simplification and it
makes `files` output consistent when run by `run`.
2025-03-06 05:13:37 -10:00
Simon Michael
3bfaa56dfb ;ci: binaries-linux-x64-stack: try to fix build; upgrade to latest stack 2025-03-05 18:52:59 -10:00
Simon Michael
5394b70dff ;ci: binaries-linux-x64-stack: fix 2025-03-05 18:28:43 -10:00
Simon Michael
20c612d0b2 ;fix:ci: add the man pages and info manuals to the unix bindists [#2309] 2025-03-05 18:21:31 -10:00
Simon Michael
45374cbfd4 ;ci: cleanups 2025-03-05 17:54:04 -10:00
Simon Michael
58c277123e ;ci: cleanups 2025-03-05 17:36:43 -10:00
Simon Michael
d883a74fe0 ;tools:just: showrelnotes 2025-03-05 16:59:14 -10:00
Simon Michael
f1c5772204 ;dev: gitignore cleanup 2025-03-05 16:59:14 -10:00
Simon Michael
a1de9148f2 ;examples: 2025-03-05 16:19:29 -10:00
Simon Michael
f97954a796 dev:commands: don't require a journal file 2025-03-05 11:37:25 -10:00
Simon Michael
4eb98a761a ;doc: update command docs 2025-03-05 11:10:49 -10:00
Simon Michael
34ba84ff9c feat: commands, an explicit command to show the commands list; refactor 2025-03-05 11:10:42 -10:00
Simon Michael
25edf03495 ;cabal: update cabal files 2025-03-04 17:06:53 -10:00
Simon Michael
cb373447db fix:cli:paging: support older less, don't pass --use-color [#2335]
Older less versions (eg 551) require --use-colour, and break if --use-color is passed. So we no longer attempt to enable colour in less by default.
2025-03-04 16:38:25 -10:00
gesh
f450379229 ;cln: Remove unused widthFromOpts (see 5c289ac)
As noted in 5c289ac, it is unused elsewhere, and registerWidthsFromOpts
is right next to it and implements nearly the exact same logic
2025-03-04 16:26:15 -10:00
gesh
a1bcdcd157 ;cln: Remove unused debugArgs
A variant of it is present as a local definition in getHledgerCliOpts'
2025-03-04 16:26:15 -10:00
Simon Michael
11ff329a8e ;pkg:ui: allow vty 6.3 2025-03-01 14:40:30 -10:00
Simon Michael
e43156ddf3 ;examples: update report scripts ahead of planned change 2025-03-01 11:23:21 -10:00
Simon Michael
6a90d503bc ;doc: csv: tiny fix [#2333] 2025-03-01 11:22:38 -10:00
Thomas Miedema
2faceb8e1b feat: csv: allow multiple matchers on the same line
`If blocks` and `If tables` now allow multiple matchers on the same line
separated by `&&` (AND) or `&& !` (AND NOT).

Example `if block` with two matchers on the same line:

	if %description amazon && %date 2025-02-22
	    account2 expenses:books

Example `if table` with two matchers on the same line:

	if,account2
	%description amazon && %date 2025-02-22, expenses:books
2025-03-01 11:21:00 -10:00
Simon Michael
0d98dd1351 ;bin:hledger-jj: updates 2025-02-27 22:26:07 -10:00
Simon Michael
d8e190e576 ;bin:hledger-jj: updates 2025-02-27 21:56:11 -10:00
Simon Michael
ebc6f06eef ;bin:readme: edits 2025-02-27 21:45:17 -10:00
Simon Michael
76114385e7 ;bin: edits 2025-02-27 21:40:17 -10:00
Simon Michael
f34a0d6248 ;feat:bin: hledger-jj, another VCS CLI using newer tech (jj, ysh) 2025-02-27 21:27:58 -10:00
Simon Michael
a65900c62d imp:cli: recognise .ysh, .osh file extensions as addons 2025-02-27 21:26:57 -10:00
Simon Michael
97f831f741 ;bin:hledger-git: run pass-through commands in the right repo 2025-02-27 17:10:44 -10:00
Simon Michael
956a2f6565 ;doc: manuals: update command options 2025-02-27 15:26:17 -10:00
Simon Michael
b629c31f9a ;doc: manuals: remove obsolete mentions of COLUMNS [#2340] 2025-02-27 15:26:17 -10:00
Simon Michael
d346e56b79 dev: fix warnings, update yaml file, edit [#2340] 2025-02-27 13:41:48 -10:00
gesh
3fa39c17b3 dev: Remove usage of partial NE.fromList
At this point, we're just giving a default for unpacking a Maybe
2025-02-27 13:41:48 -10:00
gesh
cde77eace0 fix: Remove references to $COLUMNS
As noted in Hledger.Utils.IO, COLUMNS is a bashism that isn't
particularly usable for our purposes (for one thing, it isn't updated
when the terminal is resized)
2025-02-27 13:41:48 -10:00
gesh
a24c39f13f fix: Use POSIX API to compute tty width (#2332)
On some systems, TERM is set to a value that doesn't have a valid
terminfo entry. Rather than hackily fall back on a value for TERM that
appears to work in most contexts (TERM=dumb) but which isn't guaranteed
anywhere to be valid, use proper POSIX ioctls to get the tty width.

This has the added bonus of also working on Windows.

In fact, we already settled on computing the terminal size in this way
in hledger-lib, so this commit centralizes the choice of the logic
there.

Also added a note for alternative methods and their tradeoffs, in case
this turns out to be fragile on some systems.
2025-02-27 13:41:48 -10:00
Thomas Miedema
1ca90065db ;dev: fix hledger/bench/bench.hs
In commit 603b2e9f09, the signature of `readJournalFile` changed. Ever
since, `bench/bench.hs` did not compile. Fix it by using the "easy"
function `readJournalFile'` instead, which assumes default options and
returns in the IO monad.
2025-02-27 07:32:44 -10:00
Thomas Miedema
3392176993 ;dev: update bench*.sh files
Since commit 4c7abc3d2f, `just samplejournals` creates sample journals
in the examples/ directory with a different naming scheme (e.g.
`1ktxns-1kaccts.journal` instead of `1000x1000x10.journal`). Reflect
this change in the bench*.sh files. Also fix `just bench-throughput`.
2025-02-27 07:32:44 -10:00
Thomas Miedema
5129a94bd7
;cln: unittest.hs: remove bothersome PackageImports (#2337)
When running `cd hledger-lib && ghci test/unittest.hs`, ghci complains
with:

```
  test/unittest.hs:7:1: error:
      Could not find module ‘Hledger’
      It is not a module in the current program, or in any known package.
    |
  7 | import "hledger-lib" Hledger (tests_Hledger)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  Failed, no modules loaded.
```

This commit removes the "hledger-lib" package-qualified import, such
that above ghci command works as expected.

However, there is a comment in hledger-lib/test/unittest.hs that says:

> package-qualified import to avoid cabal missing-home-modules warning
> (and double-building ?)

The missing-home-modules warning and the double building can indeed be
reproduced by running (after removing the "hledger-lib"
package-qualified import): `cd hledger-lib && cabal build unittest`. It
will first build `hledger-lib`, then show a warning about
missing-home-modules, and then build `hledger-lib` again.

After comparing the unittest sections of hledger.cabal and
hledger-lib.cabal, the solution turned out to be to remove `./` from
hs-source-dirs for unittest. Don't ask me why though!

Overall it's a nice cleanup.
2025-02-26 11:54:59 -10:00
Simon Michael
f288a7d801 ;dev: ignores 2025-02-25 10:59:12 -10:00
Simon Michael
d807d7bd0c ;imp:bal: improve --layout option description 2025-02-23 12:25:48 -10:00
Simon Michael
d4884def4b ;doc:shell completions: mention zsh; cleanups 2025-02-21 17:16:40 -10:00