diff options
author | Matthew Lemon <chaffinach+git@protonmail.ch> | 2022-05-14 17:12:06 +0100 |
---|---|---|
committer | Matthew Lemon <chaffinach+git@protonmail.ch> | 2022-05-14 17:12:06 +0100 |
commit | 59cbbffa4653084c2e2b1b83998cce220e5136a6 (patch) | |
tree | d8cbbfb0515448f2682678068ff74dbf817725de | |
parent | fc51328a1df612fa5b5328965fcbafb09d2004e9 (diff) |
changed batnote to ksh
-rwxr-xr-x | batnote_openbsd | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/batnote_openbsd b/batnote_openbsd index 9a0dea9..f2a8429 100755 --- a/batnote_openbsd +++ b/batnote_openbsd @@ -1,15 +1,14 @@ -#!/usr/local/bin/bash +#!/bin/ksh # a script for FZFing through my Notes folder for quick reading. # Uses bat if installed, otherwise will use less. -NOTES=/home/$USER/Notes -FZF_BIN=/home/$USER/.fzf/bin/fzf -BAT=/usr/bin/bat -LESS=/usr/bin/less -VIM=/usr/local/bin/vim +NOTES="/home/$USER/Notes" +FZF_BIN="/home/$USER/.fzf/bin/fzf" +CAT="/usr/bin/less" +VIM="/usr/local/bin/vim" -CMD=$LESS +CMD="$CAT" # instead of viewing with less, we want to edit in Vim if ! [[ -x $FZF_BIN ]]; then @@ -48,9 +47,6 @@ fi # fi -if [[ -x $BAT ]]; then - CMD=$BAT -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)" |