bradyt / cone

A ledger.
https://cone.tangential.info
20 stars 5 forks source link

Option to show alias only omitting account name #68

Open ghost opened 4 years ago

ghost commented 4 years ago

Hi all,

In cone 0.2.20 we have option to search and use any alias defined in ledger file and that works fine. I have recently enriched my ledger file with accounts, to use --pedantic error check in ledger-cli, and cone started displaying double entries in this case whenever i searched for matching alias.

Example: wallet is used as alias (wallet) but cone will display account as well (Assets:Wallet), containing matching word. This is functional example for this bug report purposes:

Is it possible to put this on a back log so we can expect this feature in future? Thank you.

bradyt commented 4 years ago

Hmm, I haven't looked at the parser recently, but it should be easy enough to parse alias directives, keep them in memory as some sort of pairs, and then remove the expansion of each alias from the dropdown completion. (I'm also imagining that this won't actually make it harder to possibly work with beancount files too.)

It mIght be a while for me to get to this, especially as I'm not sure how long it will take to get the whole project back up, and porting to iOS is I think the next priority.

If anyone comes up with a nice, clean implementation and/or tests, of course it's appreciated.