From f8432aa2aca00c50316978df3ff30e558740b31f Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Tue, 16 Nov 2021 11:20:15 +0000 Subject: [PATCH] list contents if I try and cat a directory --- shells/shared/functions | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shells/shared/functions b/shells/shared/functions index bfda255a..12e64d7c 100644 --- a/shells/shared/functions +++ b/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"