mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-15 18:15:53 +03:00
Add access to specific env vars in %val{...} evaluation
This commit is contained in:
parent
31f9d87798
commit
4c31449a65
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user