mirror of
https://github.com/go-task/task.git
synced 2026-06-30 08:04:28 +00:00
Add shellQuote template function
This commit is contained in:
@@ -639,6 +639,9 @@ Task also adds the following functions:
|
||||
converts a string from `/` path format to `\`.
|
||||
- `exeExt`: Returns the right executable extension for the current OS
|
||||
(`".exe"` for Windows, `""` for others).
|
||||
- `shellQuote`: Quotes a string to make it safe for use in shell scripts.
|
||||
Task uses [this Go function](https://pkg.go.dev/mvdan.cc/sh/v3@v3.4.0/syntax#Quote)
|
||||
for this. The Bash dialect is assumed.
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user