mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-07 21:15:19 +03:00
dev: Runs shellcheck on hledger-simplebal
Shellcheck handled the variable fixups. The pipefail flag avoids another Shellcheck warning w.r.t. handling pipe failures. This script is so minimal that it's safe to simply fail the pipe entirely if the hledger command fails.
This commit is contained in:
parent
4faa381ccd
commit
2ac0905c70
@ -3,8 +3,10 @@
|
||||
# total of `hledger balance`, optionally with arguments, as a single
|
||||
# machine-readable number. Requires hledger 1.24 or newer.
|
||||
|
||||
set -o pipefail
|
||||
|
||||
VALUATION_COMMODITY="$"
|
||||
hledger bal -0 -N -X "$VALUATION_COMMODITY" --infer-market-prices -c "$VALUATION_COMMODITY 1000" --layout=bare "$@" | awk '{print $1}'
|
||||
hledger bal -0 -N -X "${VALUATION_COMMODITY}" --infer-market-prices -c "${VALUATION_COMMODITY} 1000" --layout=bare "$@" | awk '{print $1}'
|
||||
|
||||
# Tired of complex financial reports ? This is a silly but fun and
|
||||
# occasionally useful script showing how to get "one number" semi-robustly
|
||||
|
Loading…
Reference in New Issue
Block a user