mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-19 23:21:15 -03:00
Insert boundary token at quotes, makes things like $foo"bar" work right
darcs-hash:20051207144307-ac50b-a708fa43b196f435efdcb1bfac17ce592cdb4533.gz
This commit is contained in:
8
common.c
8
common.c
@@ -1208,14 +1208,14 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
|
||||
case L'\'':
|
||||
{
|
||||
mode = 1;
|
||||
out_pos--;
|
||||
in[out_pos] = INTERNAL_SEPARATOR;
|
||||
break;
|
||||
}
|
||||
|
||||
case L'\"':
|
||||
{
|
||||
mode = 2;
|
||||
out_pos--;
|
||||
in[out_pos] = INTERNAL_SEPARATOR;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1236,7 +1236,7 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
|
||||
{
|
||||
if( c == L'\'' )
|
||||
{
|
||||
out_pos--;
|
||||
in[out_pos] = INTERNAL_SEPARATOR;
|
||||
mode = 0;
|
||||
}
|
||||
else
|
||||
@@ -1257,7 +1257,7 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
|
||||
case '"':
|
||||
{
|
||||
mode = 0;
|
||||
out_pos--;
|
||||
in[out_pos] = INTERNAL_SEPARATOR;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
10
expand.h
10
expand.h
@@ -81,6 +81,11 @@ enum
|
||||
|
||||
/** Character representing separation between two bracket elements */
|
||||
BRACKET_SEP,
|
||||
/**
|
||||
Separate subtokens in a token with this character.
|
||||
*/
|
||||
INTERNAL_SEPARATOR,
|
||||
|
||||
}
|
||||
;
|
||||
|
||||
@@ -107,11 +112,6 @@ enum
|
||||
/** String containing the character for separating two array elements */
|
||||
#define ARRAY_SEP_STR L"\x1e"
|
||||
|
||||
/**
|
||||
Separate subtokens in a token with this character.
|
||||
*/
|
||||
#define INTERNAL_SEPARATOR 0xfffffff0
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user