1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-06 21:45:10 +01:00

Alias bat so it works for batcat

This commit is contained in:
2020-08-20 10:46:35 +02:00
parent 88f0f0a17a
commit 3450865acb
2 changed files with 8 additions and 0 deletions

View File

@@ -22,6 +22,11 @@ alias lll='ls --color=always -alF | less -R'
# append history instead of overwriting: # append history instead of overwriting:
shopt -s histappend shopt -s histappend
if command -v batcat &> /dev/null; then
# Sometimes `bat` has the binary `batcat`, like on Debian or Ubuntu
alias bat='batcat'
fi
alias findphp='find . -name "*.php" | xargs grep --color=auto' alias findphp='find . -name "*.php" | xargs grep --color=auto'
alias findjs='find . -name "*.js" | xargs grep --color=auto' alias findjs='find . -name "*.js" | xargs grep --color=auto'
alias findcss='find . -name "*.css" | xargs grep --color=auto' alias findcss='find . -name "*.css" | xargs grep --color=auto'

View File

@@ -98,6 +98,9 @@ function grepl
grep --color=always -ir $argv | less -R grep --color=always -ir $argv | less -R
end end
# Sometimes `bat` has the binary `batcat`, like on Debian or Ubuntu
alias bat (command -v batcat || echo bat)
function rgl function rgl
rg -p $argv | less -RFX rg -p $argv | less -RFX
end end