mirror of
https://github.com/jessebot/dot_files.git
synced 2025-10-01 01:48:43 +00:00
bat released for macOS now 🎉
This commit is contained in:
parent
2c1c78c9c0
commit
6a8a5d6987
2 changed files with 7 additions and 10 deletions
|
@ -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
12
.bashrc
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue