aboutsummaryrefslogtreecommitdiffstats
path: root/docs/Command_Templates.md
diff options
context:
space:
mode:
authorEric Callahan <arksine.code@gmail.com>2022-06-21 12:39:00 -0400
committerKevinOConnor <kevin@koconnor.net>2022-06-27 10:09:02 -0400
commit6ad6e39ad227a6d782946501e95627a6843beb04 (patch)
tree3346093e9da25befbe0f3867014d586184f10e5d /docs/Command_Templates.md
parenta431900f7f90b8dca56bed5e5a2564411e780ee9 (diff)
downloadkutter-6ad6e39ad227a6d782946501e95627a6843beb04.tar.gz
kutter-6ad6e39ad227a6d782946501e95627a6843beb04.tar.xz
kutter-6ad6e39ad227a6d782946501e95627a6843beb04.zip
docs: add SET_DISPLAY_TEXT documentation
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Diffstat (limited to 'docs/Command_Templates.md')
-rw-r--r--docs/Command_Templates.md9
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/Command_Templates.md b/docs/Command_Templates.md
index 3aa68c13..c89d85bc 100644
--- a/docs/Command_Templates.md
+++ b/docs/Command_Templates.md
@@ -138,8 +138,13 @@ This is quite useful if you want to change the behavior of certain commands like
[gcode_macro M117]
rename_existing: M117.1
gcode:
- M117.1 { rawparams }
- M118 { rawparams }
+ {% if rawparams %}
+ {% set escaped_msg = rawparams|replace('"', '\\"') %}
+ SET_DISPLAY_TEXT MSG="{escaped_msg}"
+ RESPOND TYPE=command MSG="{escaped_msg}"
+ {% else %}
+ SET_DISPLAY_TEXT
+ {% endif %}
```
### The "printer" Variable