Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2025-06-10
15:06 • Closed ticket [b876737a0b]: tcl::tm::path doesn't handle tilde expand pl... artifact: eab2824eab user: jan.nijtmans
11:34
Fix [b876737a0b]: tcl::tm::path doesn't handle tilde expand check-in: 7ad80e3bed user: jan.nijtmans tags: core-9-0-branch
02:29 • Ticket [b876737a0b] tcl::tm::path doesn't handle tilde expand status sti... artifact: 09b850804d user: apnadkarni
2025-06-09
16:55
Fix for [b876737a0b]: tcl::tm::path doesn't handle tilde expand check-in: 00f47f6b33 user: jan.nijtmans tags: bug-b876737a0b
14:36 • New ticket [b876737a0b] tcl::tm::path doesn't handle tilde expand. artifact: 4d047eb224 user: jan.nijtmans

tcl::tm::path doesn't handle tilde expand

Closed / Fixedb876737a0bc55f0efabb1c6082da375cac65cc7eCreated 1 year agoUpdated 1 year ago
Descriptionwiki2025-06-09 14:36:23
Example (MacOS):
$ tclsh9.0
% tcl::tm::path list
/Library/Tcl/tcl9/site-tcl /Library/Tcl/tcl9/9.0 /Users/jan/workspace/tcl9.0/macosx/~/Library/Tcl/tcl9/site-tcl /Users/jan/workspace/tcl9.0/macosx/~/Library/Tcl/tcl9/9.0 /usr/local/lib/tcl9/site-tcl /usr/local/lib/tcl9/9.0 /Library/Frameworks/Tcl.framework/Versions/9.0/Resources/tcl9/site-tcl /Library/Frameworks/Tcl.framework/Versions/9.0/Resources/tcl9/9.0

The 3th and 4th entries don't make sense.

Referenced by2
apnadkarnimarkdown2025-06-10 02:29:55

I don't think this fix is correct. As TIP 602 explicitly says

Note that the commands tcl::tm::add and tcl::tm::roots will not themselves do any tilde expansion.

Tildes are not special characters in Tcl 9 with the exception in the TIP for initialization at startup from environment variables including TCL9_0_TM_PATH etc.

It is up to the caller of tm::add and tm::roots to do tilde expansion or not as they see fit.

In this case, I am not sure where the paths containing ~ are coming from. If from environment variables at startup, then that initialization code should do the expansion before calling tm::add.

jan.nijtmanswiki2025-06-10 15:06:08

Fixed [here]

Thanks, Ashok! I moved the handling of "file tildeexpand" to the caller of tcl::tm::roots.

Log in (anonymous is fine) to add a comment.