[Tcsh] $prompt and interactive shells

Luis Miguel Silveira lms at inesc-id.pt
Wed Dec 22 00:51:37 UTC 2021


Hi,


I used to include

     if ($?prompt) then

           ....

     endif

in some files or even at the top of some scripts to avoid 
reading/executing chunks of them in a non-interactive shell.  For 
instance in .tcshrc I used to have

     if ($?prompt)  echo "running tcsh..."

which would only echo if on an interactive shell and _not_ on a shell 
script.

Now with 6.22 it seems to always print the above string.

Has this behavior changed?  If so, how can I get the same behavior back?

It appears that the "edit" variable might do the trick, but it sounds 
fishy that that would be the way to do it.

Any help is appreciated.  Thanks.

-L. Miguel Silveira





More information about the Tcsh mailing list