mksh and OpenBSD's ksh support an alternative case syntax for historical reasons [1], case $i { *pattern) do ;; *pattern2) do2 ;; } Currently, sh-mode cannot handle this and the easy way out of writing a semicolon after $i is out since, % case "foo"; { *o) echo 1;; } /bin/mksh: syntax error: unexpected ';' I came with the attached patch after a bit of trial and error but I'm not sure if it is the right way to do it.