Update shell_command component configuration (#7471)

This commit is contained in:
Klaas Schoute 2018-11-12 11:51:07 +01:00 committed by Fabian Affolter
parent df2d7ba55f
commit 70232f9d84

View File

@ -25,10 +25,12 @@ shell_command:
restart_pow: touch ~/.pow/restart.txt restart_pow: touch ~/.pow/restart.txt
``` ```
Configuration variables: {% configuration %}
alias:
- Alias for the command description: Give the shell command a name (alias) as a variable and set the command you want to execute after the colon. e.g., `alias`:`the shell command you want to execute`.
- Command itself. required: true
type: string
{% endconfiguration %}
The commands can be dynamic, using templates to insert values for arguments. When using templates, shell_command runs in a more secure environment which doesn't allow any shell helpers like automatically expanding the home dir `~` or using pipe symbols to run multiple commands. Similarly, only content after the first space can be generated by a template. This means the command name itself cannot be generated by a template, but it must be literally provided. The commands can be dynamic, using templates to insert values for arguments. When using templates, shell_command runs in a more secure environment which doesn't allow any shell helpers like automatically expanding the home dir `~` or using pipe symbols to run multiple commands. Similarly, only content after the first space can be generated by a template. This means the command name itself cannot be generated by a template, but it must be literally provided.