mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 07:34:32 +00:00
Add support for \\ in quoted strings
darcs-hash:20060306015012-ac50b-a510764b624d1e4416d134f5b92532e046a6125b.gz
This commit is contained in:
parent
083fcd6491
commit
91ab644173
2 changed files with 7 additions and 4 deletions
2
common.c
2
common.c
|
@ -1154,6 +1154,7 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
|
|||
{
|
||||
switch( in[++in_pos] )
|
||||
{
|
||||
case '\\':
|
||||
case L'\'':
|
||||
{
|
||||
in[out_pos]=in[in_pos];
|
||||
|
@ -1211,6 +1212,7 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
|
|||
return 0;
|
||||
}
|
||||
|
||||
case '\\':
|
||||
case L'$':
|
||||
case '"':
|
||||
{
|
||||
|
|
|
@ -72,10 +72,11 @@ quoted string, <a href='#expand-variable'>variable expansion</a> still
|
|||
takes place. Other than that, a quoted parameter will not be parameter
|
||||
expanded, may contain spaces, and escape sequences are ignored. The
|
||||
only backslash escape accepted within single quotes is \\', which
|
||||
escapes a single quote. The only backslash escapes accepted within
|
||||
double quotes are \\", which escapes a double quote, and \\$, which
|
||||
escapes a dollar character. Single quotes have no special meaning
|
||||
withing double quotes and vice versa.
|
||||
escapes a single quote and \\\\, which escapes the backslash
|
||||
symbol. The only backslash escapes accepted within double quotes are
|
||||
\\", which escapes a double quote, \\$, which escapes a dollar
|
||||
character, and \\\\, which escapes the backslash symbol. Single quotes
|
||||
have no special meaning withing double quotes and vice versa.
|
||||
|
||||
Example:
|
||||
|
||||
|
|
Loading…
Reference in a new issue