Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
implement `string unescape` to complement `string escape` #3543
Comments
faho
added
the
enhancement
label
Nov 12, 2016
|
There have been times I've wanted this as well. Note that there's a nice little hack that you can use with # Assuming same $var as before
commandline -r -- $var
set list_var (commandline -opc)
commandline -r -- ""Though really that just has some novelty value to it and shouldn't be actually used. |
|
Makes sense to me to add this. |
floam
added this to the fish-future milestone
Nov 13, 2016
krader1961
changed the title from
Enhancement: Provide a `string unescape` subcommand.
to
implement `string unescape` to complement `string escape`
Dec 24, 2016
krader1961
referenced this issue
Jun 20, 2017
Closed
need a way to encode strings to valid var names or URLs #4150
krader1961
self-assigned this
Jun 23, 2017
krader1961
modified the milestones:
fish 2.7.0,
fish-future
Jun 23, 2017
krader1961
added a commit
to krader1961/fish-shell
that referenced
this issue
Jun 23, 2017
krader1961
referenced this issue
Jun 23, 2017
Closed
implement `string escape --style=xxx` and `string unescape` #4159
krader1961
closed this
in
f3cb625
Jun 24, 2017
krader1961
referenced this issue
Jun 24, 2017
Closed
in our docs why doesn't `\\u6161` work while `\\x07` does? #4162
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
kbauer commentedNov 12, 2016
The command
string escapeallows bypassing limitations of the scripting language where needed, e.g. to store a list in a single string (allowing, but discouraging, nested list semantics) withAs of 2.4.0, however, there is no safe way to unescape such values. While
unpacks the quoted list into an actual list, but will happily evaluate any commands smuggled into a manipulated
$varas well. Astring unescapesubcommand would fix this.sh -c 'env HOME=$(mktemp -d) fish')?fish version installed (
fish --version): 2.4.0-111-g7356987OS/terminal used: Windows 10, Mintty