aboutsummaryrefslogtreecommitdiff
path: root/files/.zsh/rc
diff options
context:
space:
mode:
authorAnton Bobov <anton@bobov.name>2024-02-08 19:38:41 +0500
committerAnton Bobov <anton@bobov.name>2024-02-08 19:38:41 +0500
commit19b3096392fcc12cb177bd7f4d788b054349c7df (patch)
treed6d5335a81153f72b97a64953679f8d54e7df29f /files/.zsh/rc
parent7652c45609757b7aa5541dc0ae156333366d5cd4 (diff)
Updates
Diffstat (limited to 'files/.zsh/rc')
-rw-r--r--files/.zsh/rc/S51_ledger7
1 files changed, 4 insertions, 3 deletions
diff --git a/files/.zsh/rc/S51_ledger b/files/.zsh/rc/S51_ledger
index 88b66eb..eb168d5 100644
--- a/files/.zsh/rc/S51_ledger
+++ b/files/.zsh/rc/S51_ledger
@@ -44,9 +44,10 @@ lx() {
}
budgets() {
- seq 0 24 | xargs -I{} date -d "this month - {} months" +%Y-%m | \
- fzf --reverse --preview-window 90% --preview 'ledger budget --force-color -p {} --exchange R ^Expenses and not ^Expenses:Cash'
-}
+ first_day_of_current_month=$(date +%Y%m01)
+ seq 0 24 | xargs -I{} date -d "$first_day_of_current_month - {} months" +%Y-%m | \
+ fzf --reverse --preview-window 90% --preview 'ledger budget --force-color -p {} --exchange R ^Expenses and not ^Expenses:Cash'
+ }
expenses() {
account=$(ledger accounts -p 'last 6 months' '^Assets:' | fzf)