Check bat exists before overiding it

Jonathan Hodgson 4 years ago
parent a93a6074e2
commit 0eb79c5f40
  1. 4
      shells/shared/functions

@ -310,6 +310,10 @@ function debugToggle(){
function cat(){ function cat(){
local grcConfigs="$HOME/.config/grc/" local grcConfigs="$HOME/.config/grc/"
if ! type -p bat > /dev/null; then
/usr/bin/cat "$@"
return $?
fi
if [ -f "$1" ]; then if [ -f "$1" ]; then
local ext="${1##*.}" local ext="${1##*.}"
if [ -f "${grcConfigs}conf.${ext}" ]; then if [ -f "${grcConfigs}conf.${ext}" ]; then

Loading…
Cancel
Save