client/container: bash: trivial impl for ledger-vui
Leverages journal to visidata for an alternative read-only terminal UI.
This commit is contained in:
@@ -46,6 +46,12 @@ function lib_ledger::ledger-ui()
|
||||
lib_utils::catch $?
|
||||
}
|
||||
|
||||
function lib_ledger::ledger-vui()
|
||||
{
|
||||
lib_ledger::__ledger-vui "$@"
|
||||
lib_utils::catch $?
|
||||
}
|
||||
|
||||
function lib_ledger::ledger-web()
|
||||
{
|
||||
lib_ledger::__ledger-web "$@"
|
||||
@@ -132,6 +138,12 @@ function lib_ledger::__ledger-ui()
|
||||
/usr/bin/hledger-ui -f "$global_child_profile_journal" "$@"
|
||||
}
|
||||
|
||||
function lib_ledger::__ledger-vui()
|
||||
{
|
||||
/usr/bin/hledger -f "$global_child_profile_journal" print -O csv "$@" \
|
||||
| visidata --motd-url file:///dev/null --filetype csv
|
||||
}
|
||||
|
||||
function lib_ledger::__ledger-web()
|
||||
{
|
||||
/usr/bin/hledger-web -f "$global_child_profile_journal" "$@"
|
||||
|
||||
@@ -186,6 +186,12 @@ function lib_finance::ledger-ui()
|
||||
lib_utils::catch $?
|
||||
}
|
||||
|
||||
function lib_finance::ledger-vui()
|
||||
{
|
||||
lib_ledger::ledger-vui "$@"
|
||||
lib_utils::catch $?
|
||||
}
|
||||
|
||||
function lib_finance::ledger-web()
|
||||
{
|
||||
lib_ledger::ledger-web "$@"
|
||||
|
||||
Reference in New Issue
Block a user