Somehow, shell environment isn't applied for commands that are executed in VimR via :terminal {command}, however, if the terminal is opened via :terminal and the command is executed in the opened window, the environment is applied.
E.g. if I run :terminal echo $ZSH in neovim launched in iTerm it returns /Users/vyacheslav/.oh-my-zsh. The same result if I open terminal in VimR using :terminal and then run the command echo $ZSH.
But if I run the command :terminal echo $ZSH in VimR, it returns an empty string. However, if I run :terminal source ~/.zshrc && echo $ZSH it returns /Users/vyacheslav/.oh-my-zsh again.
Somehow, shell environment isn't applied for commands that are executed in VimR via
:terminal {command}
, however, if the terminal is opened via:terminal
and the command is executed in the opened window, the environment is applied.E.g. if I run
:terminal echo $ZSH
in neovim launched in iTerm it returns/Users/vyacheslav/.oh-my-zsh
. The same result if I open terminal in VimR using:terminal
and then run the commandecho $ZSH
.But if I run the command
:terminal echo $ZSH
in VimR, it returns an empty string. However, if I run:terminal source ~/.zshrc && echo $ZSH
it returns/Users/vyacheslav/.oh-my-zsh
again.Reproduced in
v0.34.0
and inv0.35.0