[Tcsh] $prompt and interactive shells
Kimmo Suominen
kim at netbsd.org
Wed Dec 22 08:25:39 UTC 2021
Hi Miguel,
The first thing I would check is /etc/csh.cshrc and /etc/csh.login to
see if they unconditionally set the prompt. At least FreeNAS used to
do that. (I don't currently have one running to check current TrueNAS,
though.)
Kind regards,
+ Kimmo
On Wed, 22 Dec 2021 at 03:34, Luis Miguel Silveira <lms at inesc-id.pt> wrote:
>
>
> 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
>
>
>
> --
> Tcsh mailing list
> Tcsh at astron.com
> https://mailman.astron.com/mailman/listinfo/tcsh
More information about the Tcsh
mailing list