From a6cc98521d5a419caf8a19faabf704fb59ee0995 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 27 Oct 2022 11:24:45 -1000 Subject: [PATCH] feat: bin: watchaccounts --- bin/README.md | 10 ++++++++++ bin/watchaccounts | 9 +++++++++ 2 files changed, 19 insertions(+) create mode 100755 bin/watchaccounts 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" $@