C-shell 语法:太多(.cshrc 中的警告

C-shell syntax: Too many ('s. warning in .cshrc

问题出在PATH部分吗? 当我尝试用 setenv 修复 PATH 时,我得到:

set: Variable name must begin with a letter.

这是文件的一个片段:

setenv MAIL /usr/spool/mail/$USER
setenv MATLABPATH /home/users/me/matlab/functions:/home/users/me/matlab/scripts
setenv PYTHONPATH /home/users/me/python/modules:/home/users/me/python/scripts
set path=( /sbin /bin /usr/bin /usr/local/bin /usr/local/java/bin
           /usr/bin/X11 ~/bin)
if (! $?csh) then
   if($?prompt) then
        set prmptchr=$prompt
   else
        set prmptchr="/"
   endif
   alias setprompt 'set prompt = "$cwd$prmptchr "' # directory name in prompt
   alias cd 'chdir \!*; setprompt'
   alias pushd 'pushd \!*; setprompt'
   alias popd 'popd \!*; setprompt'
   setprompt
endif

以下是更正的 2 个问题:

setenv MAIL /usr/spool/mail/$USER
setenv MATLABPATH /home/users/me/matlab/functions:/home/users/me/matlab/scripts 
setenv PYTHONPATH /home/users/me/python/modules:/home/users/me/python/scripts

# Added \ to split across multiple lines
set path=( /sbin /bin /usr/bin /usr/local/bin /usr/local/java/bin \
           /usr/bin/X11 ~/bin)
if (! $?csh) then
   if($?prompt) then
        # Added " around $prompt to make sure it's quoted correctly.
        set prmptchr="$prompt"
   else
        set prmptchr="/"
   endif
   alias setprompt 'set prompt = "$cwd$prmptchr "' # directory name in prompt
   alias cd 'chdir \!*; setprompt'
   alias pushd 'pushd \!*; setprompt'
   alias popd 'popd \!*; setprompt'
   setprompt
endif