Prevent undefined variable error on remote login

Aug 28, '02 09:06:19AM

Contributed by: robg

In the hint on fixing tcsh, there's a short exchange in the comments regarding an undefined error message after fixing the tcsh shell. "Robert" writes:

I followed the instructions, but now I get a message "TERM_PROGRAM: Undefined variable." when I log in by SSH. This did not happen in 10.1.
"vajonez" wrote in with the answer (also separately submitted by "TheGS"):
There is a typo in /usr -> share -> tcsh -> examples -> aliases. Change the line that says:
if ("$TERM_PROGRAM" == "Apple_Terminal") then
to:
if ("$?TERM_PROGRAM" == "Apple_Terminal") then
You'll need to "sudo" edit this file, as it's owned by root. I can attest that fixing the typo removes the error message.

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020828090619956