You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on the docs and some tests it doesn't seem possible to use variable substitutions in confirm messages. I would have expected something like this to work:
[confirm("Really do stuff with {{arg}}?")]
actionarg:@echo Doing stuff with {{arg}}
But it doesn't:
$ just action fooReally do stuff with {{arg}}? yDoing stuff with foo
The text was updated successfully, but these errors were encountered:
{{…}} interpolations aren't processed in strings. See #11.
But the issue is still valid, since you can't do:
[confirm("Really do stuff with " + arg + "?")]
actionarg:@echo Doing stuff with {{arg}}
Changing this would require accepting an expression in the confirm attribute, and evaluating it. This is a somewhat involved change, since then the evaluator needs to evaluate expressions inside of attributes, but I think it's reasonable.
casey
changed the title
[confirm()] attribute does not process variable substitutions
Allow expressions in [confirm: …] attribute
Jul 31, 2024
Based on the docs and some tests it doesn't seem possible to use variable substitutions in confirm messages. I would have expected something like this to work:
But it doesn't:
The text was updated successfully, but these errors were encountered: