Skip to content

feat: balance option --full-path#2661

Open
thielema wants to merge 1 commit into
simonmichael:mainfrom
thielema:balance-full-path
Open

feat: balance option --full-path#2661
thielema wants to merge 1 commit into
simonmichael:mainfrom
thielema:balance-full-path

Conversation

@thielema

Copy link
Copy Markdown
Contributor

This is a draft for #2429. If you accept it, it still needs some documentation. It serves my needs for a year now, however I am unhappy that we may add a lot of these options in the future that alter an aspect or another of selecting accounts and adapting their formatting. Hledger started with a set of configurations that were useful but now it turns out that sometimes you need to alter individual items in the configurations.

@simonmichael

Copy link
Copy Markdown
Owner

I'm afraid I don't really understand this or #2429. And I'm a bit worried about flag proliferation. Draft docs / examples / use case will be helpful.

@thielema

Copy link
Copy Markdown
Contributor Author

I hoped that #2429 would explain well enough what I need the option for. I'll try to add a simplified example. Summarised I need the option for using VLOOKUP in LibreOffice for accessing numbers provided by Hledger in a FODS table.

I agree with your worries about flag proliferation. I do not have very good ideas for that problem other than making the flags more principled. We could also make full-path the default for FODS and CSV export, since these are intended for machine-processing. However, I tried hard to unify export to HTML, CSV, FODS before.

@simonmichael

Copy link
Copy Markdown
Owner

That helped, thanks.

This new general report flag only affects tree mode balance reports' FODS output, I see.

@simonmichael

Copy link
Copy Markdown
Owner

More precisely: currently it's a new balance command flag, affecting only the tree-mode FODS output, but it's stored in the general ReportOpts.

@simonmichael

Copy link
Copy Markdown
Owner

In its present form it feels a bit inconsistent. One might expect it to affect all reports that can show a tree of account names.

Would this be another way to get the same info: make list mode balance reports include all the normally-elided parent accounts, when --no-elide is used ?

@thielema

Copy link
Copy Markdown
Contributor Author

As I have written in #2429, I also tried adding parent accounts to List Mode, but adding full paths to Tree Mode turned out much simpler.
I added the --full-path option where I found the List/Tree switch. Is there a better place?
The --full-path option affects HTML, CSV, FODS output. It seems to leave Text output unaffected, although this was not intended. However, since Text is not suitable for further automatic processing, this could be feature not a bug.

@thielema

Copy link
Copy Markdown
Contributor Author

You can see here my first attempt to add parent accounts to the List View:
https://github.com/thielema/hledger/tree/balance-include-parent

@simonmichael

Copy link
Copy Markdown
Owner

I see. From a UX perspective, it sounds nice if we could reuse --no-elide, since it's already there, has the right sort of meaning, and currently has no effect on list mode reports.

@simonmichael

Copy link
Copy Markdown
Owner

I can have a look at it also if helpful.

@thielema

thielema commented Jul 15, 2026 via email

Copy link
Copy Markdown
Contributor Author

@simonmichael

simonmichael commented Jul 15, 2026 via email

Copy link
Copy Markdown
Owner

@thielema

thielema commented Jul 15, 2026 via email

Copy link
Copy Markdown
Contributor Author

@thielema

thielema commented Jul 16, 2026 via email

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants