Skip to content

Commit 1fdf4a5

Browse files
committed
added helper for, e.g., "check 50"
1 parent 52bce67 commit 1fdf4a5

File tree

1 file changed

+6
-0
lines changed
  • opt/cs50/lib/help50

1 file changed

+6
-0
lines changed

opt/cs50/lib/help50/bash

+6
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ if [[ "$output" =~ $regex ]]; then
3636
exit
3737
fi
3838

39+
# If CS50 command
40+
if [[ "${BASH_REMATCH[1]}" =~ ^(check|style|submit)$ && "$2" == "50" ]]; then
41+
echo "Did you mean to run \`${BASH_REMATCH[1]}50\`, without a space, instead?"
42+
exit
43+
fi
44+
3945
# If backslash instead of forward slash
4046
if [[ "${BASH_REMATCH[1]}" =~ ^\.(.*) ]]; then
4147
if [[ -f "./${BASH_REMATCH[1]}" ]]; then

0 commit comments

Comments
 (0)