Check bat exists before overiding it
This commit is contained in:
parent
32dcc8c957
commit
f6cbc5ddad
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue