Initial commit
This commit is contained in:
32
src/sh/tools.sh
Normal file
32
src/sh/tools.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
if command -v "fzf" >/dev/null; then
|
||||
FZF="fzf --black"
|
||||
else
|
||||
err "Did not find the command-line fuzzy finder fzf."
|
||||
exit 1
|
||||
fi
|
||||
export FZF
|
||||
|
||||
if command -v "bat" >/dev/null; then
|
||||
CAT="bat"
|
||||
elif command -v "batcat" >/dev/null; then
|
||||
CAT="batcat"
|
||||
fi
|
||||
CAT=${CAT:+$CAT --color=always --style=plain --language=md}
|
||||
CAT=${CAT:-cat}
|
||||
export CAT
|
||||
|
||||
if command -v "curl" >/dev/null; then
|
||||
CURL="curl --silent"
|
||||
else
|
||||
err "Did not find curl."
|
||||
exit 1
|
||||
fi
|
||||
export CURL
|
||||
|
||||
if command -v "jq" >/dev/null; then
|
||||
JQ="jq"
|
||||
else
|
||||
err "Did not find jq."
|
||||
exit 1
|
||||
fi
|
||||
export JQ
|
Reference in New Issue
Block a user