mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.4883: string interpolation only works in heredoc
Problem: String interpolation only works in heredoc. Solution: Support interpolated strings. Use syntax for heredoc consistent with strings, similar to C#. (closes #10327)
This commit is contained in:
@@ -3769,8 +3769,12 @@ eval7(
|
||||
|
||||
/*
|
||||
* Environment variable: $VAR.
|
||||
* Interpolated string: $"string" or $'string'.
|
||||
*/
|
||||
case '$': ret = eval_env_var(arg, rettv, evaluate);
|
||||
case '$': if ((*arg)[1] == '"' || (*arg)[1] == '\'')
|
||||
ret = eval_interp_string(arg, rettv, evaluate);
|
||||
else
|
||||
ret = eval_env_var(arg, rettv, evaluate);
|
||||
break;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user