From 73d415e111bb30f951a67734af014626a07d58ab Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Sat, 16 Nov 2019 19:37:56 +0100 Subject: [PATCH] add introduction to ladd --- local/bin/ladd | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/local/bin/ladd b/local/bin/ladd index 3b4e929..7921986 100755 --- a/local/bin/ladd +++ b/local/bin/ladd @@ -1,4 +1,12 @@ #!/bin/sh +# Copies a previous transaction to today. +# +# Select a previous transaction by fuzzy matching on the titles. This +# transaction is then copied to the end of the journal, uncleared and +# set to the current date. Finally, it opens the end of the file in vi. +# +# Bonus over `hledger add`: interactive matching it easier, and +# transaction formatting is retained because it's just a copy. ledger="${1:-$LEDGER_FILE}" @@ -27,7 +35,7 @@ x wq HERE -# review change: open end of the file in vis -vis +\$ "$ledger" +# review change: open end of the file +vi +\$ "$ledger" clear