Re: avoiding .scottyrc in scotty-2.1.x

Robert Premuz (rpremuz@srce.hr)
Wed, 2 Oct 1996 14:14:04 +0200 (MET DST)

On Thu, 26 Sep 1996, Juergen Schoenwaelder wrote:
>
> Robert Premuz <rpremuz@srce.hr> said:
>
> Robert> The obsoleted scotty-2.0.x had the -n option for telling
> Robert> scotty not to source ~/.scottyrc. On the other hand,
> Robert> scotty-2.1.x always source ~/.scottyrc and ~/.tclshrc.
>
> Thats not 100 % correct. It only sources ~/.tclshrc if it is invoked
> interactively.
>
> Robert> Now, I'd like to know is there a way to avoid this feature of
> Robert> the new scotty, i.e. tnm.
>
> For what reason? The Tnm package sources ~/.scottyrc once it is
> loaded, regardless if it is running interactively or not. This allows
> to keep personal definitions into this startup file (e.g. snmp alias
> definitions) that are always available. If you want to do things that
> are only useful for an interactive session, put them into ~/.tclshrc
> or check the global tcl_interactive variable.

The unconditional sourcing of ~/.scottyrc containing personal
definitions is probably very useful when scotty interprets tkined
scripts, but tkined is not the only scotty/Tnm application. If someone
uses another scotty application together with tkined, the ability of
not sourcing ~/.scottyrc may be useful as the new application may
interact badly with the code in ~/.scottyrc (e.g. an SNMP agent is
such a scotty application where the sourcing is not needed and could
cause problems).

v
-- rpr. : Robert B. Premuz * Email: rpremuz@public.srce.hr
http://public.srce.hr/~rpremuz/ * Voice at home: +385 (0)1 687564