diff --git a/bin/README.md b/bin/README.md index 16e4cfdf7..45367d844 100644 --- a/bin/README.md +++ b/bin/README.md @@ -50,6 +50,16 @@ $ . bin/bashrc $ fin # list the scripts available ``` +### watchaccounts + +[`watchaccounts`](https://github.com/simonmichael/hledger/blob/master/bin/watchaccounts) +shows hledger account names, updating on file change under the current directory. +Arguments are passed to the `hledger accounts` command. Useful when cleaning up accounts. +```cli +$ watchaccounts expenses -2 +$ watchaccounts -f time.journal client1 date:thismonth -l +``` + ### hledger-simplebal [`hledger-simplebal`](https://github.com/simonmichael/hledger/blob/master/bin/hledger-simplebal) diff --git a/bin/watchaccounts b/bin/watchaccounts new file mode 100755 index 000000000..c804c1525 --- /dev/null +++ b/bin/watchaccounts @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +# Watch hledger account names, updating on file change under the current directory. +# Arguments are passed to hledger. Useful when cleaning up accounts. +# Requires watchexec. +# Examples: +# watchaccounts expenses -2 +# watchaccounts -f time.journal client1 date:thismonth -l + +watchexec -c -- "echo ==; hledger accounts -t" $@