heinrichmartin wrote:
> On Sunday, September 23, 2018 at 12:44:39 AM UTC+2, J Leslie Turriff
> wrote:
>> $ tclsh
>> % set tcl_pkgPath
>> /usr/lib64/tcl /usr/share/tcl
>>
>> I want to add /usr/local/lib64/tcl (which resides in a separate
>> partition) to the path on a system-wide basis so that system upgrades
>> don't interact with locally installed Tcl code,
>
> Not so sure about this constraint (not even whether I fully understand
> it), but assuming the best for my suggestion below.
>
>> and so that each user on the
>> system doesn't have tweak the Tcl path.
>> What's the best way to accomplish this?--
>
> While I haven't found a global rc-file for tclsh, you could set TCLLIBPATH
> in the shell's rc-file.
Okay, but that means that every individual user would have to modify
their .bashrc, right?
>
> "Note: tcl_pkgPath is not intended to be modified by the application. Its
> value is added to auto_path at startup; changes to tcl_pkgPath are not
> reflected in auto_path. If you want Tcl to search additional directories
> for packages you should add the names of those directories to auto_path,
> not tcl_pkgPath." [1]
Yeah; it's difficult for me to see which of these have priority over
others, which shouldn't be touched, etc.
>
> Note that tclsh (called in a shell) is just one possibility to initialize
> a Tcl interpreter, e.g. expect has $exp_library/expect.rc.
Does tclsh have an equivalent to the bash shell's .bashrc?
>
> [1]
http://tcl.tk/man/tcl8.6/TclCmd/tclvars.htm#M23
--
JLT