list contents if I try and cat a directory
This commit is contained in:
parent
766dcab3a7
commit
8a56e49a74
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue