当我创建一个tmux会话时,加载正确版本的ruby/node时遇到了问题。如果我使用不带tmux的ruby/node,则不会发生这种情况。
$ tmux new-session -s servers
$ which ruby
/usr/bin/ruby与正常终端会话相比:
/Users/amree/.asdf/shims/ruby相关的dotfiles:
更多信息
tmux)。我通过运行echo $SHELL来确认它tmux配置文件没有帮助发布于 2018-03-01 02:51:41
实际的问题是,当我打开tmux会话时,$PATH再次被/etc/zprofile自动添加。
为了防止这种情况,我只是在tmux会话中禁用它:
# /etc/zprofile
# system-wide environment settings for zsh(1)
if [ -x /usr/libexec/path_helper ]; then
if [ -z "$TMUX" ]; then
eval `/usr/libexec/path_helper -s`
fi
fihttps://stackoverflow.com/questions/48980777
复制相似问题