diff options
author | Matthew Lemon <y@yulqen.org> | 2024-02-01 11:30:36 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-02-01 11:30:36 +0000 |
commit | 0148eeb1d647dc9ce5eb122e62388fc8f8e37208 (patch) | |
tree | e237df265cbce6b61280a58d870b843675289425 | |
parent | d5bb061c65466229ebc268ab2b65eaf78bc7fb94 (diff) |
Gone with bat for batnote
-rwxr-xr-x | batnote | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -6,17 +6,20 @@ NOTES=/home/$USER/Documents/Notes FZF_BIN=/usr/bin/fzf BAT=/usr/bin/bat -LESS=/usr/bin/less +CAT=/usr/bin/cat +#LESS=/usr/bin/less VIM=/usr/bin/vim -CMD=$LESS +set -e + +CMD="$BAT" -# instead of viewing with less, we want to edit in Vim if ! [[ -x $FZF_BIN ]]; then echo "You need to have FZF installed for this to work." exit 1 fi +# instead of viewing with less, we want to edit in Vim if [[ $1 = "-v" ]] then echo "Using vim..." @@ -34,9 +37,9 @@ fi # fi -if [[ -x $BAT ]]; then - CMD=$BAT -fi +# if [[ -x $BAT ]]; then +# CMD=$CAT +# fi # Thanks to https://stackoverflow.com/a/1489405 for the find command to omit .git clear; $CMD "$(find $NOTES -name '.git*' -type d -prune -o -type f -print|$FZF_BIN)" |