.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "STRING-UNESCAPE" "1" "Nov 13, 2025" "4.2" "fish-shell" .SH NAME string-unescape \- expand escape sequences .SH SYNOPSIS .nf \fBstring\fP \fBescape\fP [\fB\-n\fP | \fB\-\-no\-quoted\fP] [\fB\-\-style\fP\fB=\fP] [\fISTRING\fP \&...] \fBstring\fP \fBunescape\fP [\fB\-\-style\fP\fB=\fP] [\fISTRING\fP \&...] .fi .sp .SH DESCRIPTION .sp \fBstring escape\fP escapes each \fISTRING\fP in one of several ways. .sp \fB\-\-style=script\fP (default) alters the string such that it can be passed back to \fBeval\fP to produce the original argument again. By default, all special characters are escaped, and quotes are used to simplify the output when possible. If \fB\-n\fP or \fB\-\-no\-quoted\fP is given, the simplifying quoted format is not used. Exit status: 0 if at least one string was escaped, or 1 otherwise. .sp \fB\-\-style=var\fP ensures the string can be used as a variable name by hex encoding any non\-alphanumeric characters. The string is first converted to UTF\-8 before being encoded. .sp \fB\-\-style=url\fP ensures the string can be used as a URL by hex encoding any character which is not legal in a URL. The string is first converted to UTF\-8 before being encoded. .sp \fB\-\-style=regex\fP escapes an input string for literal matching within a regex expression. The string is first converted to UTF\-8 before being encoded. .sp \fBstring unescape\fP performs the inverse of the \fBstring escape\fP command. If the string to be unescaped is not properly formatted it is ignored. For example, doing \fBstring unescape \-\-style=var (string escape \-\-style=var $str)\fP will return the original string. There is no support for unescaping \fB\-\-style=regex\fP\&. .SH EXAMPLES .INDENT 0.0 .INDENT 3.5 .sp .EX >_ echo \ex07 | string escape \ecg >_ string escape \-\-style=var \(aqa1 b2\(aq\eu6161 a1_20_b2_E6_85_A1_ .EE .UNINDENT .UNINDENT .SH COPYRIGHT fish-shell developers .\" Generated by docutils manpage writer. .