aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/Command_Templates.md19
1 files changed, 5 insertions, 14 deletions
diff --git a/docs/Command_Templates.md b/docs/Command_Templates.md
index c89d85bc..3435d6c1 100644
--- a/docs/Command_Templates.md
+++ b/docs/Command_Templates.md
@@ -130,22 +130,13 @@ gcode:
### The "rawparams" variable
-The full unparsed parameters for the running macro can be access via the `rawparams` pseudo-variable.
+The full unparsed parameters for the running macro can be access via the
+`rawparams` pseudo-variable.
-This is quite useful if you want to change the behavior of certain commands like the `M117`. For example:
+Note that this will include any comments that were part of the original command.
-```
-[gcode_macro M117]
-rename_existing: M117.1
-gcode:
- {% if rawparams %}
- {% set escaped_msg = rawparams|replace('"', '\\"') %}
- SET_DISPLAY_TEXT MSG="{escaped_msg}"
- RESPOND TYPE=command MSG="{escaped_msg}"
- {% else %}
- SET_DISPLAY_TEXT
- {% endif %}
-```
+See the [sample-macros.cfg](../config/sample-macros.cfg) file for an example
+showing how to override the `M117` command using `rawparams`.
### The "printer" Variable