Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Rich Newsgroups: comp.lang.tcl Subject: Re: Tcl: Shared directory for .tm modules across 8.6 and 9.0? Date: Mon, 5 May 2025 22:45:24 -0000 (UTC) Organization: A noiseless patient Spider Lines: 32 Message-ID: References: Injection-Date: Tue, 06 May 2025 00:45:24 +0200 (CEST) Injection-Info: dont-email.me; posting-host="143924ecab2acd90bce63bd61485d839"; logging-data="1530102"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tI/EeHJl9waVx35kNgqUc" User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64)) Cancel-Lock: sha1:uUj7YUqmaSm3Dx8pY6h9V20FvrQ= greg wrote: > Hello, > I'm using .tm modules on Linux (Debian) and currently have the > following environment variables set (.profile, .bashrc, .xsessionrc ): > > > export TCL8_6_TM_PATH="$HOME/lib/tcl8.6/site-tcl" > export TCL9_0_TM_PATH="$HOME/lib/tcl9.0/site-tcl" > > > This works fine. However: > is there a way to define a shared directory for .tm modules that can be > used by multiple Tcl versions, such as both 8.6 and 9.0? From the 'tm' man page (https://www.tcl-lang.org/man/tcl8.6.11/TclCmd/tm.html): $::env(TCLX_y_TM_PATH) A list of paths, separated by either : (Unix) or ; (Windows). This is user and site specific as this environment variable can be set not only by the user's profile, but by system configuration scripts as well. Note the "a list" and "separated by either : or ;" parts of the documentation. Just create a shared dir, and add the shared dir to both variables, i.e. (assuming Unix below): export TCL8_6_TM_PATH="$HOME/lib/tcl8.6/site-tcl:$HOME/lib/tcl-shared/stuff"