ActionPrompts: More flexibility for selection_command
Allow users to control how and where the choice is inserted into the response by explicitly including "{choice}" in the selection_command
This commit is contained in:
1 parent
5c54f16ece
commit
2e6ee57162
1 file changed
+4
-1
@@ -207,7 +207,10 @@ class ActionCommandPromptPlugin(octoprint.plugin.AssetPlugin,
|
||||
return
|
||||
|
||||
self._close_prompt()
|
||||
self._printer.commands(["{command} S{choice}".format(command=self._command,
|
||||
if "{choice}" in self._command:
|
||||
self._printer.commands([self._command.format(choice=choice)])
|
||||
else:
|
||||
self._printer.commands(["{command} S{choice}".format(command=self._command,
|
||||
choice=choice)])
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user