mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-09 03:51:20 -03:00
Highlight invalid use of variable expansion operator
darcs-hash:20060601230438-ac50b-165ec1515e0e02674a992a1f0309a567aa6828de.gz
This commit is contained in:
15
highlight.c
15
highlight.c
@@ -219,9 +219,17 @@ static void highlight_param( const wchar_t * buff,
|
||||
break;
|
||||
}
|
||||
|
||||
case L'$':
|
||||
{
|
||||
wchar_t n = buff[in_pos+1];
|
||||
color[in_pos] = (n==L'$'||wcsvarchr(n))? HIGHLIGHT_OPERATOR:HIGHLIGHT_ERROR;
|
||||
color[in_pos+1] = HIGHLIGHT_NORMAL;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case L'*':
|
||||
case L'?':
|
||||
case L'$':
|
||||
case L'(':
|
||||
case L')':
|
||||
{
|
||||
@@ -349,8 +357,9 @@ static void highlight_param( const wchar_t * buff,
|
||||
|
||||
case '$':
|
||||
{
|
||||
color[in_pos] = HIGHLIGHT_OPERATOR;
|
||||
color[in_pos+1] = HIGHLIGHT_QUOTE;
|
||||
wchar_t n = buff[in_pos+1];
|
||||
color[in_pos] = (n==L'$'||wcsvarchr(n))? HIGHLIGHT_OPERATOR:HIGHLIGHT_ERROR;
|
||||
color[in_pos+1] = HIGHLIGHT_QUOTE;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user