suewonjp / tclsh-wrapper

A tiny wrapper for Tcl/Tk's tclsh and wish
Apache License 2.0
22 stars 4 forks source link

glob substitutions break list expansion operator {*} #11

Open JohnLunzer opened 4 years ago

JohnLunzer commented 4 years ago

There is a large section of code in proc TclReadLine::tclline {} that deals with glob substitution. This breaks the list expansion operator. This code:

set a [list 1 2 3 4]
+ {*}$a

Breaks because the * gets expanded to the list of files in the current working directory.

As a quick fix, commenting out all the glob substitution code in that function fixes the issue and the code list above current sums the numbers.