hledger
hledger copied to clipboard
Tags autocomplete in hledger add
Hi, thanks for this useful software.
It would be possible to implement tag auto-completion as it is for accounts and payee.
I know, if I declare all account with various tag combination, hledger will suggest which one to use by pressing TAB. However it feels more like a workaround than a solution.
Hi, where are you thinking to do this ? In hledger-web add form ?
Hi, I come from a full features web (php) application where inserting a transaction requires minutes :-( IMHO plain text data entry are unbeatable.
I haven't tried hledger-web or iadd yet, but honestly I prefer the CLI way:
2022-01-01 Description
expenses:food $10 ; {TAB or Arrow here for tags suggestion}
...
So... you're using hledger add ? Or pressing tab in an Emacs ledger-mode buffer ?
I'm new to hledger,
for now I'm using hledger add from bash. Autocompletion works well for payee and accounts, but for now tags must be typed entirely.
Thanks! hledger has several user interfaces, but now it's clear. I agree tag completion would be nice.
Currently, tags are entered with hledger add as follows: after entering a transaction description or posting amount, add some spaces, a semicolon, and start typing a comment, which may contain one or more tags.
So hledger doesn't know exactly when you entering a tag, but I think it could work well enough if, once you have a begun a comment, to tab-complete any word as if it were a tag name. Optionally you could also tab-complete a single : (or, just a tab press while not in the middle of a word) as the start of a tag name. I would welcome a PR.