It'd be very nice if we could have a module to help
with those trickier quoting tasks that newbies get
slightly wrong. Here's some example code adapted from
a discussion on the chat...
proc makeMap {} {
set chars {{[\"$#; ]}}
append chars \t
set map [list \n \\n]
foreach c [split $chars {}] {lappend map $c \\$c}
return $map
}
variable addBackslashMap [makeMap]
proc backslashQuote {string} {
variable addBackslashMap
string map $addBackslashMap $string
}
proc braceQuote {string} {
list $string
}
There's probably other things that could be added too.