The list commands used with uplevel (since user's fix) is used to avoid something known as double-evaluation, it does not affect the data passed to the foreach command, which still has to be a valid list.
The problem you are facing with "set scripts [list ... ]" is that you don't properly escape the newline character using \
Wrong:
Code: Select all
set scripts [list
scripts/script1.tcl
scripts/script2.tcl
scripts/script3.tcl
]
Code: Select all
set scripts [list \
scripts/script1.tcl \
scripts/script2.tcl \
scripts/script3.tcl \
]
Whenever a string is evaluated (in this case due to []), a newline means end of command-line, and the first word on the next line is treated as a new command. Escaping the newline prevents this, and lets us span a single command-line over several lines.