Perl Shell - A Solution

! s/^\s*:\s*// && $s

First, the subsitute expression (s/^\s*:\s*//) tries to match $_ against this pattern: the beginning of the string (^) followed by zero or more whitespace characters (\s*), then a colon (:), then possibly some more whitespace (\s*). If it matches, the matching part of the string is stripped out (ie, substituted with nothing) and the substitute expression has a true value. If not, it just has a false value.

The negate operator (!) then reverses the truth value of the substitute expression. So, the left side of the "and" (&&) expression is true if the command did not begin with a colon.

The right side of the expression ($s), indicates whether the -s switch was used to invoke psh. So, the entire expression is true if the command did not begin with a colon and the -s switch was given.

Note: