mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 10:43:47 +08:00
Replace an expensive expand_one call with the cheaper unescape_string
Makes parsing a little faster
This commit is contained in:
parent
46cd89c2db
commit
ebfaa8cc95
|
@ -1240,8 +1240,8 @@ static parse_keyword_t keyword_for_token(token_type tok, const wchar_t *tok_txt)
|
|||
}
|
||||
else
|
||||
{
|
||||
wcstring storage = tok_txt;
|
||||
if (expand_one(storage, EXPAND_SKIP_CMDSUBST | EXPAND_SKIP_VARIABLES | EXPAND_SKIP_WILDCARDS | EXPAND_SKIP_JOBS | EXPAND_SKIP_HOME_DIRECTORIES))
|
||||
wcstring storage;
|
||||
if (unescape_string(tok_txt, &storage, 0))
|
||||
{
|
||||
result = keyword_with_name(storage.c_str());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user