We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
subst
\[
$
Admittedly obscure, but it bit me today.
Example jimsh repl session (with notes and newlines added for readability):
jimsh
Welcome to Jim version 0.82 . set x 123 123 . subst {$\[foo] $x} $[foo] $x ← error - simplest case . subst {\[foo] $x} [foo] 123 ← ok - no dollar sign . subst {$ \[foo] $x} $ [foo] $x ← error - space after dollar sign . subst {$ \[foo] $x} $ [foo] $x ← error - multiple spaces after dollar sign . puts "$\[foo] $x" $[foo] 123 ← ok - string interpolation works . set y 789 789 . subst {$\[foo] $x $y} $[foo] $x $y ← error - multiple variables . subst {$\[foo] ${x} ${y}} $[foo] ${x} ${y} ← error - bracing variable names doesn't help . subst {$\[foo] {> $x {> $y {> } $[foo] $x $y ← error - multiple lines . subst {\$\[foo] $x} $[foo] 123 ← ok - escaping dollar sign . subst {$x $y $\[foo] $x $y} 123 789 $[foo] $x $y ← error - following variables don't interpolate
The same session in tclsh:
tclsh
% set x 123 123 % subst {$\[foo] $x} $[foo] 123 % subst {\[foo] $x} [foo] 123 … further examples show correct output …
I 💜 Jim! Thanks again for all your work on it.
The text was updated successfully, but these errors were encountered:
d161274
Thanks for the report. Fixed!
Sorry, something went wrong.
No branches or pull requests
Admittedly obscure, but it bit me today.
Example
jimsh
repl session (with notes and newlines added for readability):The same session in
tclsh
:I 💜 Jim! Thanks again for all your work on it.
The text was updated successfully, but these errors were encountered: