bat released for macOS now 🎉

This commit is contained in:
JesseBot 2022-11-08 11:29:48 +01:00
parent 2c1c78c9c0
commit 6a8a5d6987
2 changed files with 7 additions and 10 deletions

View file

@ -33,6 +33,9 @@ brew "fzf"
# ls replacement written in rust: https://github.com/Peltoche/lsd
brew "lsd"
# A cat(1) clone with syntax highlighting and Git integration.
brew "bat"
# this is a file manager TUI: https://www.geeksforgeeks.org/ranger-a-cli-file-manager/
brew "ranger"
@ -66,7 +69,7 @@ brew "cowsay"
###########################################################
# ===-----------------------------------------------=== #
# Git #
# Git #
# ===-----------------------------------------------=== #
###########################################################

12
.bashrc
View file

@ -164,7 +164,7 @@ alias gerp='grep'
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cat ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# TODO: Write those docs with links to both apps (rich, and batcat)
# TODO: Write those docs with links to both apps (rich, and bat)
# Function to use the best syntax highlighting app for the job
function dog {
# if file has more lines than legnth of the terminal use app with pager
@ -183,14 +183,8 @@ function dog {
echo ""
fi
else
# On Linux, use batcat - sytnax highlighting + git support and pager
if [[ $(uname) == *"Linux"* ]]; then
batcat $1
else
# add line numbers
rich -n $1
echo ""
fi
# use batcat - sytnax highlighting + git support and pager
bat $1
fi
}