I would like to be able to use $TMPDIR and $HOME in PARAMS like so:
RUN_SHELL_COMMAND CMD=calibrate_shaper PARAMS="--shapers {shapers} $TMPDIR/resonances_y_b.csv -o $HOME/printer_data/config/images/resonances_y.png"
The change I have in my local fork is:
diff --git a/klippy/extras/gcode_shell_command.py b/klippy/extras/gcode_shell_command.py
index da2427512..3f7843055 100644
--- a/klippy/extras/gcode_shell_command.py
+++ b/klippy/extras/gcode_shell_command.py
@@ -53,6 +53,7 @@ class ShellCommand:
def cmd_RUN_SHELL_COMMAND(self, params):
gcode_params = params.get("PARAMS", "")
+ gcode_params = os.path.expandvars(gcode_params)
gcode_params = shlex.split(gcode_params)
reactor = self.printer.get_reactor()
try:
Wondering if Kalico would consider making this change and if so will it be useful for me to open a PR?
I would like to be able to use $TMPDIR and $HOME in PARAMS like so:
The change I have in my local fork is:
Wondering if Kalico would consider making this change and if so will it be useful for me to open a PR?