qvacua / vimr

VimR — Neovim GUI for macOS in Swift
https://twitter.com/VimRefined
MIT License
6.64k stars 218 forks source link

Neovim terminal environment is empty on command executing #888

Open alexeevit opened 2 years ago

alexeevit commented 2 years ago

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.

Reproduced in v0.34.0 and in v0.35.0