1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-19 01:11:36 +03:00

Add access to specific env vars in %val{...} evaluation

This commit is contained in:
Maxime Coste 2014-07-30 19:17:04 +01:00
parent 31f9d87798
commit 4c31449a65

View File

@ -323,7 +323,12 @@ String eval_token(const Token& token, Context& context,
case Token::Type::OptionExpand:
return context.options()[content].get_as_string();
case Token::Type::ValExpand:
{
auto it = env_vars.find(content);
if (it != env_vars.end())
return it->second;
return ShellManager::instance().get_val(content, context);
}
case Token::Type::RawEval:
return eval(content, context, shell_params, env_vars);
case Token::Type::Raw: