Commit Graph

559 Commits

Author SHA1 Message Date
Simon Michael
4aa7d7e20d fix:ui: re-check balance assertions properly when --pivot is used [#2451]
When hledger-ui is started with --pivot, re-enabling balance
assertions with the I key now does a full journal reload, to check
balance assertions accurately. It means that in pivot mode, the I key
can also show other data changes (as if you pressed the g key).
2025-10-09 10:29:39 -10:00
Caleb Maclennan
a7c447a393 ;fix:ui: fix file watcher to catch file overwrites 2025-10-07 12:28:45 -10:00
Simon Michael
2f007c93d2 dev: switch all qualifed imports to ImportQualifiedPost style 2025-09-29 19:28:59 -10:00
Simon Michael
546b172be2 dev:ui:transaction, error screens: fix for third fix 2025-09-13 09:46:48 +01:00
Simon Michael
112272fd8f fix:ui:transaction, error screens: more robust updating, third fix [#2014], [#2288]
This makes both transaction screen and error screen below the
transaction screen update as we'd expect when using the E key, g key,
or --watch. No visible bugs known at the moment.
2025-09-13 09:23:59 +01:00
Simon Michael
d303e09603 imp:ui: improve debug output 2025-09-12 22:56:31 +01:00
Simon Michael
e9c1fc36a3 fix:ui:transaction screen: update on data changes, second fix [#2288]
This one is more thorough and hopefully more robust.
Compared to the first fix, it fixes an error seen in --watch mode
when you save an error (and maybe then save a second edit,
and then repair the error - I forget)
2025-09-12 10:04:41 +01:00
Simon Michael
e87d9e3ce3 ;dev:ui: note issue with regenerateScreens 2025-09-12 10:02:35 +01:00
Simon Michael
5d1bb5c2ad ;dev:ui:ErrorScreen: note possible updating issue after E key 2025-09-12 10:02:35 +01:00
Simon Michael
27fcd50914 dev:ui:refactor, clarify uiReload* 2025-09-12 10:02:35 +01:00
Simon Michael
51842034dd dev:ui:refactor, rename enableForecast 2025-09-12 10:02:35 +01:00
Simon Michael
53bd228973 imp:ui: debug output improvements 2025-09-12 10:02:35 +01:00
Simon Michael
7ccc0d5bdd lib:Hledger.UI.ErrorScreen: rename, clarify uiReload*
uiReloadJournal -> uiReload
 uiReloadJournalIfChanged -> uiReloadIfFileChanged
2025-09-12 10:02:35 +01:00
Simon Michael
c7c196caa6 fix:ui:transaction screen: update on data changes, first fix [#2288]
Make the transaction screen refresh properly after running an editor
with E, or reloading with g or --watch.
2025-09-12 10:02:02 +01:00
Simon Michael
c906788334 ;dev:ui: RegisterScreen: cleanup 2025-09-11 16:45:52 +01:00
Simon Michael
e64c26e603 lib!: rename withJournal -> withJournalDo, with alias and deprecation warning 2025-09-11 10:03:10 +01:00
Simon Michael
a4692a4a38 fix:ui: preserve --pivot (and --obfuscate) options when reloading [#2451] 2025-09-11 09:56:42 +01:00
savanto
230998136f imp: areg: do not abbrev other accts in machine-readable output (#1995)
- Do not turn "other accounts" into a comma-delimited string when the
  report is constructed, but pass `AccountName`s up the chain. This
  requires modifying the `AccountTransactionsReportItem` type to contain
  `[AccountName]` rather than `Text`.

- Perform the account name summarization
  (`Hledger.Data.AccountName.accountSummarizedName`) closer to the
  actual rendering of the report, so that different report formats can
  choose summarization strategy.

- Continue to summarize as before for terminal/text output (ie.
  human-readable). Do not summarize any more for machine-readable output
  (csv/html/fods).
2025-06-28 13:38:58 -07:00
Simon Michael
57031b0e78 dev: rename exitOnError -> handleExit, improve doc 2025-06-12 18:48:10 -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
Simon Michael
820a44eb07 imp:lib:Hledger.Utils.Debug: simpler, more consistent dbg* names 2025-05-21 22:54:00 -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
5334e7924b lib: Hledger.Cli.Version: rename PackageVersionString, more helpers 2025-04-21 15:14:12 -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
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
Simon Michael
02ef6e45e7 imp:cli: make mutually exclusive flags clearer in --help 2025-03-08 12:42:16 -10:00
Simon Michael
5f3c3f3854 fix:ui:a key: don't pass cli query args to add [#2313] 2025-01-21 22:02:34 -10:00
Stephen Morgan
7168f7efc4 imp: ui: Use new DepthSpec in hledger-ui.
The regular expression depths are ignored, and only the flat depths are
used.
2024-12-03 08:33:21 -10:00
Gal Lakovnik Gorenec
255dc015eb fix:ui: Fixed #2284 -- valuation and cost flags now reset each other on toggle. 2024-11-18 09:30:07 -10:00
Simon Michael
50bf401ea6 dev: split debug/ghcdebug flags, comment out the latter for now
Compilation with ghc-debug is failing, and it has not yet been used
for anything. Separate the flag and leave it in place but commented for now.
2024-10-24 10:44:28 -10:00
Simon Michael
4b4cc54a6a dev:ui: cleanup 2024-10-24 10:44:28 -10:00
Simon Michael
7325b75d5b imp: rename ghcdebug build flag to debug, and enable stack traces with it
Builds made with ghc 9.10+ and the 'debug' build flag, will show
(some kind of, partial) stack traces when the program ends with an
error. (And also will have ghc-debug support enabled.)

The stack traces will probably improve in due course.
2024-10-19 18:47:03 -10:00
Simon Michael
6893f342af imp: cli,ui,web: begin controlling GHC 9.10+'s stack traces 2024-10-19 16:56:14 -10:00
Simon Michael
f5b10b2d40 dev: cleanups 2024-10-19 16:56:14 -10:00
Simon Michael
b940254025 imp:cli: detect --color more safely in most cases
--color now also works in a config file, like --pager, except for two
cases: it does not affect colouring of debug output, or the colouring
helpers used in the check recentassertions error message.
2024-10-19 16:28:36 -10:00
Simon Michael
711d921774 imp:cli: --no-pager -> --pager, make this and --color safe options 2024-10-19 16:28:36 -10:00
amano.kenji
f6c98ec1d6 feat(hledger-ui): add helix as a supported editor 2024-10-15 08:03:12 -10:00
Simon Michael
6225ac8a22 imp!: support ghc 9.10 / base 4.20
When built with ghc 9.10.1, hledger error messages are displayed
with an extra newline following them.
https://gitlab.haskell.org/ghc/ghc/-/issues/25116
2024-09-30 17:15:59 -10:00
Simon Michael
d76dff310a imp: ui: menu screen: show narrowed period in header; cleanup 2024-07-12 13:49:33 +01:00
Simon Michael
a8f1968d4b imp: ui: menu screen: support the shift arrow and shift T keys, for consistency 2024-07-07 23:36:33 +01:00
Simon Michael
40620666f8 imp: cli: rename --rules-file to --rules; tweak options help
For brevity, and consistency with --conf.
--rules-file remains supported, as a hidden option.

hledger's main mode now supports the hidden legacy flags,
as the command modes do.
2024-06-25 18:37:55 +01:00
Simon Michael
6c294e91d6 fix: ui, web: accept valueless --debug flag again 2024-06-25 18:37:55 +01:00
Simon Michael
46cda5e7de imp: cli: allow command options to be written before the command also
It's clearer to write command-specific flags after the command name
argument, but that's no longer required.
(Writing non-builtin, addon-specific flags after -- is still required).

Also, give up on "obey help/doc/version flags even if there's a bad
command/flag", it's too hard to do well.
2024-06-25 18:37:54 +01:00
Simon Michael
311be367b0 ;doc: cli: simplify, use generic help flags again 2024-05-31 19:54:18 -10:00
Simon Michael
c5f8444627 feat: hledger's tldr pages are now built in, accessible via --tldr
And a few cleanups/fixes related to flag processing.
The help flags are now listed in order of precedence.
2024-05-29 15:32:19 -10:00
Simon Michael
82230e5a1f imp: cli: end help output with a blank line 2024-05-29 14:45:04 -10:00
Simon Michael
f88aa8f871 imp: cli: --info before --man 2024-05-29 09:37:20 -10:00