use skim instead of fzf
This commit is contained in:
parent
1ae637377f
commit
e925c47f14
@ -19,7 +19,7 @@ transaction formatting is retained because it's just a copy.
|
|||||||
Default: \$LEDGER_FILE
|
Default: \$LEDGER_FILE
|
||||||
|
|
||||||
Depends on:
|
Depends on:
|
||||||
- fzf (https://github.com/junegunn/fzf)
|
- skim (https://github.com/lotabout/skim)
|
||||||
- sponge (https://joeyh.name/code/moreutils/)
|
- sponge (https://joeyh.name/code/moreutils/)
|
||||||
|
|
||||||
If you split files by year, it may be useful to alias (in 2020):
|
If you split files by year, it may be useful to alias (in 2020):
|
||||||
@ -37,7 +37,7 @@ done
|
|||||||
shift $((OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
|
|
||||||
# fuzzy select a transaction title
|
# fuzzy select a transaction title
|
||||||
selection="$(sed -n 's/....-..-..\( [*!]\)\? //p' "${@:-$LEDGER_FILE}" | sort | uniq | fzf)"
|
selection="$(sed -n 's/....-..-..\( [*!]\)\? //p' "${@:-$LEDGER_FILE}" | sort | uniq | sk)"
|
||||||
[ -z "$selection" ] && exit 0 # quit if escaped
|
[ -z "$selection" ] && exit 0 # quit if escaped
|
||||||
|
|
||||||
sed -n "/....-..-..\( [*!]\)\? ${selection}\$/,/^\$/p" "${@:-$LEDGER_FILE}" | # print matching transactions
|
sed -n "/....-..-..\( [*!]\)\? ${selection}\$/,/^\$/p" "${@:-$LEDGER_FILE}" | # print matching transactions
|
||||||
|
Loading…
Reference in New Issue
Block a user