tcsh doesn't complain if you say "setenv FOO=BAR" instead of "setenv FOO BAR". Instead, it creates the environment variable "FOO" with the value "BAR=". This is exceedingly broken. Tcsh should reject environment variable names with "=" in them.
Why not? Other shells let you have environment variables with special characters (including '=') in them. I can't name an app that uses special characters (other than the underscore) in env var names, but tcsh is parsing according to its rules in determining that the '=' goes in.
I challenge you to name a single other shell which will allow you to create an environment variable with "=" in its NAME, not its VALUE. There is none, as far as I know. It's impossible to do in any sh-compatible shell because the first "=" in the variable assignment is always considered the division between the name and value of the variable. Ditto for zsh. Three other proofs that tcsh's behavior is broken: 1) The environ(5) man page says, "By convention, these strings have the form `name=value'." Obviously, if that's how variables are stored in the environment, it's impossible for a variable name to have "=" in it. 2) If you run "setenv FOO bar" and then "setenv FOO=bar" in tcsh, you end up with two settings of "FOO" in the environment: jik:~!148> setenv FOO bar jik:~!149> setenv FOO=bar jik:~!150> setenv | grep FOO FOO=bar FOO=bar= jik:~!151> In other words, the environment is now corrupt. 3) If you set an environment variable with an equal sign in it, it's impossible to get back the same environment variable: jik:~!151> unsetenv FOO jik:~!152> setenv FOO=bar jik:~!153> echo $FOO=bar bar==bar jik:~!154> echo ${FOO=bar} Missing }. jik:~!155> Note that command 153 above is interpreted as a reference to the variable FOO, which tcsh thinks has the value "bar=" because of this brokenness, followed by the string "=bar".
This is fixed in tcsh-6.12-8 and tcsh-6.13-1.