From Bugzilla Helper: User-Agent: Mozilla/4.77 [en] (X11; U; SunOS 5.7 sun4u) Description of problem: RedHat's /etc/csh.cshrc includes two "set prompt =" lines. Each ends with a trailing space. If the trailing whitespace is edited out, syntax errors "then: then/endif not found." appear, e.g. in the context of logging into a tcsh account using OpenSSH. IMHO tcsh should not be sensitive to the absence of this whitespace. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Remove the trailing ' ' characters from the 2 "set prompt =" lines in /etc/csh.cshrc 2. From another host, ssh this.redhat.host date 3. This assumes your account uses tcsh (I didn't try csh) Actual Results: rick.host's password: then: then/endif not found. [ shell prompt appears ] Expected Results: No cryptic, unsettling syntax diagnostic Additional info: setup-2.5.12-1 tcsh-6.10-6
In the fragment in question: if ($?prompt) then if ($?tcsh) then set prompt='[%n@%m %c]$ ' else set prompt=\[`id -nu`@`hostname -s`\]\$\ endif endif The first space can be removed with no adverse effects. The second space is preceded by \; if you remove the space, it is backslash-newline and the line is concatenated with the following one, in effect becoming if ($?prompt) then if ($?tcsh) then set prompt='[%n@%m %c]$ ' else set prompt=\[`id -nu`@`hostname -s`\]\$ endif endif which is indeed missing an endif.