mirror of
https://github.com/go-task/task.git
synced 2025-06-08 23:56:21 +02:00
feat: add alias q
for template function shellQuote
(#1603)
Resolves #1601
This commit is contained in:
parent
72d9671fcf
commit
16070c7a24
@ -10,6 +10,7 @@
|
|||||||
@pd93).
|
@pd93).
|
||||||
- Fix error when a file or directory in the project contained a special char
|
- Fix error when a file or directory in the project contained a special char
|
||||||
like `&`, `(` or `)` (#1551, #1584 by @andreynering).
|
like `&`, `(` or `)` (#1551, #1584 by @andreynering).
|
||||||
|
- Added alias `q` for template function `shellQuote` (#1601 by @vergenzt)
|
||||||
|
|
||||||
## v3.36.0 - 2024-04-08
|
## v3.36.0 - 2024-04-08
|
||||||
|
|
||||||
|
@ -73,6 +73,10 @@ func init() {
|
|||||||
return spew.Sdump(v)
|
return spew.Sdump(v)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// aliases
|
||||||
|
taskFuncs["q"] = taskFuncs["shellQuote"]
|
||||||
|
|
||||||
// Deprecated aliases for renamed functions.
|
// Deprecated aliases for renamed functions.
|
||||||
taskFuncs["FromSlash"] = taskFuncs["fromSlash"]
|
taskFuncs["FromSlash"] = taskFuncs["fromSlash"]
|
||||||
taskFuncs["ToSlash"] = taskFuncs["toSlash"]
|
taskFuncs["ToSlash"] = taskFuncs["toSlash"]
|
||||||
|
@ -1415,7 +1415,7 @@ Task also adds the following functions:
|
|||||||
converts a string from `/` path format to `\`.
|
converts a string from `/` path format to `\`.
|
||||||
- `exeExt`: Returns the right executable extension for the current OS (`".exe"`
|
- `exeExt`: Returns the right executable extension for the current OS (`".exe"`
|
||||||
for Windows, `""` for others).
|
for Windows, `""` for others).
|
||||||
- `shellQuote`: Quotes a string to make it safe for use in shell scripts. Task
|
- `shellQuote` (aliased to `q`): 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)
|
uses [this Go function](https://pkg.go.dev/mvdan.cc/sh/v3@v3.4.0/syntax#Quote)
|
||||||
for this. The Bash dialect is assumed.
|
for this. The Bash dialect is assumed.
|
||||||
- `splitArgs`: Splits a string as if it were a command's arguments. Task uses
|
- `splitArgs`: Splits a string as if it were a command's arguments. Task uses
|
||||||
|
@ -1377,7 +1377,7 @@ Task also adds the following functions:
|
|||||||
converts a string from `/` path format to `\`.
|
converts a string from `/` path format to `\`.
|
||||||
- `exeExt`: Returns the right executable extension for the current OS (`".exe"`
|
- `exeExt`: Returns the right executable extension for the current OS (`".exe"`
|
||||||
for Windows, `""` for others).
|
for Windows, `""` for others).
|
||||||
- `shellQuote`: Quotes a string to make it safe for use in shell scripts. Task
|
- `shellQuote` (aliased to `q`): 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)
|
uses [this Go function](https://pkg.go.dev/mvdan.cc/sh/v3@v3.4.0/syntax#Quote)
|
||||||
for this. The Bash dialect is assumed.
|
for this. The Bash dialect is assumed.
|
||||||
- `splitArgs`: Splits a string as if it were a command's arguments. Task uses
|
- `splitArgs`: Splits a string as if it were a command's arguments. Task uses
|
||||||
|
Loading…
x
Reference in New Issue
Block a user