From 1fdf4a5283aa38a2bd97d83e8758ea44ec51052f Mon Sep 17 00:00:00 2001 From: "David J. Malan" Date: Tue, 2 Jul 2024 22:39:59 -0400 Subject: [PATCH] added helper for, e.g., "check 50" --- opt/cs50/lib/help50/bash | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opt/cs50/lib/help50/bash b/opt/cs50/lib/help50/bash index defd38b..4f748de 100755 --- a/opt/cs50/lib/help50/bash +++ b/opt/cs50/lib/help50/bash @@ -36,6 +36,12 @@ if [[ "$output" =~ $regex ]]; then exit fi + # If CS50 command + if [[ "${BASH_REMATCH[1]}" =~ ^(check|style|submit)$ && "$2" == "50" ]]; then + echo "Did you mean to run \`${BASH_REMATCH[1]}50\`, without a space, instead?" + exit + fi + # If backslash instead of forward slash if [[ "${BASH_REMATCH[1]}" =~ ^\.(.*) ]]; then if [[ -f "./${BASH_REMATCH[1]}" ]]; then