Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: vfox golang env GOPATH in tmux not working #342

Open
cubatic45 opened this issue Aug 29, 2024 · 0 comments
Open

[BUG]: vfox golang env GOPATH in tmux not working #342

cubatic45 opened this issue Aug 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cubatic45
Copy link

cubatic45 commented Aug 29, 2024

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
fieval "$(vfox activate zsh)"

vb@debian ~echo $GOROOT;echo $GOPATH
/home/vb/.version-fox/temp/1724860800-47300/golang
/home/vb/go
@cubatic45 cubatic45 added the bug Something isn't working label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant