Escape Command Line String (esccli)
Less than 1 minute
esccli
)
Escape Command Line String (Escapes an array so output is valid shell code
Description
esccli
takes an array and escapes any characters that might cause problems when pasted back into the terminal. Typically you'd want to use this against command parameters.
Usage
<stdin> -> esccli -> <stdout>
esccli @array -> <stdout>
Examples
As a method
» alias foobar=out 'foo$b@r'
» alias -> [foobar]
[
"out",
"foo$b@r"
]
» alias -> [foobar] -> esccli
out foo\$b\@r
As a function
» alias -> [foobar] -> set fb
» $fb
["out","foo$b@r"]
» esccli @fb
out foo\$b\@r
Synonyms
esccli
See Also
- Alias Pointer (
alias
): Create an alias for a command - Escape HTML (
eschtml
): Encode or decodes text for HTML - Escape URL (
escurl
): Encode or decodes text for the URL - Get Item (
[ Index ]
): Outputs an element from an array, map or table - Output String (
out
): Print a string to the stdout with a trailing new line character - Quote String (
escape
): Escape or unescape input
This document was generated from builtins/core/escape/escape_doc.yaml.