Don't expand jobs during syntax highlighting

Fixes https://github.com/fish-shell/fish-shell/issues/366
This commit is contained in:
ridiculousfish 2012-10-28 16:35:02 -07:00
parent 768f92303e
commit 7c09a767b6

View file

@ -983,7 +983,7 @@ static void tokenize( const wchar_t * const buff, std::vector<int> &color, const
Command. First check that the command actually exists.
*/
cmd = tok_last( &tok );
bool expanded = expand_one(cmd, EXPAND_SKIP_CMDSUBST | EXPAND_SKIP_VARIABLES);
bool expanded = expand_one(cmd, EXPAND_SKIP_CMDSUBST | EXPAND_SKIP_VARIABLES | EXPAND_SKIP_JOBS);
if (! expanded || has_expand_reserved(cmd.c_str()))
{
color.at(tok_get_pos( &tok )) = HIGHLIGHT_ERROR;