Does .bashrc contain syntax errors?

Solution 1:

This is the standard, correct syntax for a bash case statement(known abstractly as a switch statement in general programming), albeit perhaps an odd syntax when compared to C, Java, or other languages.

From The Linux Documentation Project:

Nested if statements might be nice, but as soon as you are confronted with a couple of different possible actions to take, they tend to confuse. For the more complex conditionals, use the case syntax:

case EXPRESSION in CASE1) COMMAND-LIST;; CASE2) COMMAND-LIST;; ... CASEN) COMMAND-LIST;; esac