From c8025c2cde9669f7665bd26ce6faf9897356506f Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 6 Jul 2022 11:53:10 -0500 Subject: [PATCH] add bat help --- lib/function.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/function.sh b/lib/function.sh index f5a9581..50009ce 100755 --- a/lib/function.sh +++ b/lib/function.sh @@ -1,8 +1,8 @@ function cl() { DIR="$*" # if no DIR given, go home - if [ $# -lt 1 ]; then - DIR=$HOME + if [ $# -lt 1 ]; then + DIR=$HOME fi builtin cd "${DIR}" && # use your preferred ls command @@ -72,3 +72,8 @@ py2nb2html() { echo "generating html file for $pyfile" jupytext --to notebook -o - $pyfile | jupyter nbconvert --execute --to html --stdin $@ } + +alias bathelp='bat --plain --language=help' +help() { + "$@" --help 2>&1 | bathelp +}