vfox
vfox copied to clipboard
[BUG]: vfox golang env GOPATH in tmux not working
Version The version you are currently using OS macOS、Linux
Describe the bug GOPATH in tmux not working
Screenshots[optional]
❯ echo $GOROOT;echo $GOPATH
/home/vb/.version-fox/temp/1724860800-47300/golang
/home/vb/.version-fox/temp/1724860800-47300/golang/packages
❯ tmux
❯ echo $GOROOT;echo $GOPATH
/home/vb/.version-fox/temp/1724860800-47300/golang
/home/vb/go
Then I try to source ~/.zshrc But it still doesn't work
❯ source ~/.zshrc
❯ echo $GOROOT;echo $GOPATH
/home/vb/.version-fox/temp/1724860800-47300/golang
/home/vb/go
❯ vfox activate zsh
if [[ -z "$__VFOX_PID" ]]; then
export GOROOT=$'/home/vb/.version-fox/temp/1724860800-47300/golang';export GOPATH=$'/home/vb/.version-fox/temp/1724860800-47300/golang/packages';export __VFOX_SHELL=$'zsh';export PATH=$'/home/vb/.version-fox/temp/1724860800-47300/golang/bin:/home/vb/.version-fox/temp/1724860800-47300/golang/packages/bin:/home/vb/.local/share/zinit/polaris/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/home/vb/go/bin';export __VFOX_CURTMPPATH=$'/home/vb/.version-fox/temp/1724860800-47300';
export __VFOX_PID=$$;
_vfox_hook() {
trap -- '' SIGINT;
eval "$("/usr/local/bin/vfox" env -s zsh)";
trap - SIGINT;
}
typeset -ag precmd_functions;
if [[ -z "${precmd_functions[(r)_vfox_hook]+1}" ]]; then
precmd_functions=( _vfox_hook ${precmd_functions[@]} )
fi
typeset -ag chpwd_functions;
if [[ -z "${chpwd_functions[(r)_vfox_hook]+1}" ]]; then
chpwd_functions=( _vfox_hook ${chpwd_functions[@]} )
fi
trap 'vfox env --cleanup' EXIT
fi
❯ eval "$(vfox activate zsh)"
vb@debian ~
❯ echo $GOROOT;echo $GOPATH
/home/vb/.version-fox/temp/1724860800-47300/golang
/home/vb/go
me too
when I execute vfox use -p [email protected] in tmux session, it does not work, the PATH remain unchanged.
but, if i execute it in my regular terminal, it works.
+1
Create a new terminal and immediately execute: env | grep __VFOX. Let me see if it is consistent with the problem I encountered