mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-20 16:08:46 +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
|
@ -866,6 +866,29 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
|
|||
in[out_pos]=L'\x1b';
|
||||
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':
|
||||
|
|
Loading…
Reference in New Issue
Block a user