list contents if I try and cat a directory

master
Jonathan Hodgson 3 years ago
parent 766dcab3a7
commit 8a56e49a74
  1. 4
      shells/shared/functions

@ -314,7 +314,9 @@ function cat(){
/usr/bin/cat "$@"
return $?
fi
if [ -f "$1" ]; then
if [ -d "$1" ]; then
l "$1"
elif [ -f "$1" ]; then
local ext="${1##*.}"
if [ -f "${grcConfigs}conf.${ext}" ]; then
/usr/bin/cat "$1" | /usr/bin/grcat "${grcConfigs}conf.${ext}" | /usr/bin/bat --file-name "$1"

Loading…
Cancel
Save