ledger / vim-ledger

Vim plugin for Ledger
GNU General Public License v2.0
372 stars 55 forks source link

Fix makeprg to work around ledger cli bug #100

Closed alerque closed 4 years ago

alerque commented 4 years ago

Closes #99.

Using ledger -f % source % shouldn't be necessary and the value of the second % is actually ignored, but it doesn't work without it. That bit should be removed when the upstream bug is fixed:

https://github.com/ledger/ledger/issues/1682

The rest of this just clean up the detection of ledger vs. hledger now that we support both so this only gets set when it will be expected to work. While hledger does not have a comparable source function we can accomplish something similar by testing if print returns errors and just discarding the outut. This can be cleaned up if and when hledger ever supports this natively:

https://github.com/simonmichael/hledger/issues/1115