hpdeifel / hledger-iadd

A terminal UI as drop-in replacement for hledger add.
BSD 3-Clause "New" or "Revised" License
77 stars 8 forks source link

Support multiplication and division as operations in the amount fields #68

Closed the-solipsist closed 2 years ago

the-solipsist commented 2 years ago

Currently hledger-iadd supports addition and subtraction of numbers in amount fields. This is an enhancement request to also support multiplication and division, since those are very useful for entering added taxes or split bills.

I propose recognizing the standard symbols * and / as the symbols respectively for multiplication and division (as opposed to, say, × and ÷, which are not easy to type).

One issue that will need some thinking through is that of rounding / how many significant digits after the decimal ought to be shown. I would suggest that the same logic used by hledger while displaying amounts be used by hledger-iadd while entering amounts.

hpdeifel commented 2 years ago

I'm closing this as duplicate of #34 , even though I had to sneakily edit the description of the other issue beforehand :)

(Incidentally, the issue number of this issue is exactly twice the old one...)