From bba678cc8b338975e60552339fdef89de30b3f00 Mon Sep 17 00:00:00 2001 From: "David J. Malan" Date: Thu, 18 Jan 2024 17:06:16 -0500 Subject: [PATCH] added helper --- opt/cs50/lib/help50/bash | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opt/cs50/lib/help50/bash b/opt/cs50/lib/help50/bash index de1198c..6c298b0 100755 --- a/opt/cs50/lib/help50/bash +++ b/opt/cs50/lib/help50/bash @@ -12,6 +12,11 @@ if [[ "$output" =~ $regex ]]; then fi fi +regex="bash: \./(.*): Is a directory" +if [[ "$output" =~ $regex ]]; then + echo "Cannot execute a directory. Did you mean to \`cd\` into \`${BASH_REMATCH[1]}\` instead?" +fi + regex="bash: (./.*\.py): Permission denied" if [[ "$output" =~ $regex ]]; then