Repository navigation
Conversation
Underscore-separated subparts within an account name component are now capitalised and joined, so e.g. assets:wells_fargo:fima_usd becomes Assets:WellsFargo:FimaUsd instead of the previous hex-encoded Assets:WellsC5ffargo:FimaC5fusd. Underscores in hledger account names are conventionally used as a space substitute, so treating them as word boundaries produces much cleaner Beancount output.
|
Thanks for the PR. |
|
I use hyphens rather than underscores to separate account name sub-parts; and of course spaces are the other common separator. Here's how they're all handled currently: Would it be simpler and more consistent to replace https://hledger.org/1.52/hledger.html#beancount-account-names currently says
It would be nice to always use |
|
I think the simplest, most consistent fix is to replace underscore with hyphen, as we do for spaces. Would you like to follow up on this @waj ? |
…2596] Underscores are a common hledger word separator, like spaces; converting them to dashes rather than hex-encoding them (assets:wells_fargo -> Assets:Wells-fargo, not Assets:WellsC5ffargo) gives cleaner and more consistent beancount account names. AI usage: Opus 5, ~4k output tokens
|
I went with that alternate fix. Thanks for raising the issue. |
Underscore-separated subparts within an account name component are now capitalised and joined, so e.g.
assets:wells_fargo:fima_usdbecomesAssets:WellsFargo:FimaUsdinstead of the previous hex-encodedAssets:WellsC5ffargo:FimaC5fusd. Underscores in hledger account names are conventionally used as a space substitute, so treating them as word boundaries produces much cleaner Beancount output.