mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-01 17:03:59 +08:00
Add support for \cx backslash escapes for control sequences, syntax is borrowed from bash
darcs-hash:20060831155813-ac50b-cc93412afc87c1c391c3dbc5e7b8c9175efe01d8.gz
This commit is contained in:
parent
b6e8171f01
commit
6de0c4103b
23
common.c
23
common.c
|
@ -867,6 +867,29 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case L'c':
|
||||||
|
{
|
||||||
|
in_pos++;
|
||||||
|
if( in[in_pos] >= L'a' &&
|
||||||
|
in[in_pos] <= (L'a'+32) )
|
||||||
|
{
|
||||||
|
in[out_pos]=in[in_pos]-L'a'+1;
|
||||||
|
}
|
||||||
|
else if( in[in_pos] >= L'A' &&
|
||||||
|
in[in_pos] <= (L'A'+32) )
|
||||||
|
{
|
||||||
|
in[out_pos]=in[in_pos]-L'A'+1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
free(in);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
case L'u':
|
case L'u':
|
||||||
case L'U':
|
case L'U':
|
||||||
case L'x':
|
case L'x':
|
||||||
|
|
Loading…
Reference in New Issue
Block a user