GetStream / vg

Virtualgo: Easy and powerful workspace based development for go
MIT License
1.32k stars 45 forks source link

Allow replacing ~/.virtualgo with VIRTUALGO_ROOT #19

Closed glasser closed 6 years ago

glasser commented 7 years ago

Caveat: only tested under bash. fish code cargo culted from https://unix.stackexchange.com/questions/81421/how-do-i-reference-a-variable-in-fish-shell-with-a-default-fallback and untested.

Fixes #17.

JelteF commented 7 years ago

Looks fine, but I'll try to test this in all the shells in the near future. For the moment, could you merge master and regenerate the bindata file?

JelteF commented 7 years ago

Just tested it quickly with fish btw and it doesn't work.

glasser commented 7 years ago

I updated based on root.

I've finished my evaluation of vg and it looks like it's super great for personal use, but a little overkill for my project's use (where we already need some wrapper scripts in order to support non-Go ecosystems). The part that's most attractive to me is the dep ensure wrapper which adds "write to GOPATH rather than vendor" and "install binaries" to dep — I'm wondering if there's a hope of getting that into upstream dep? That said I'm still happy to try to finish this PR even though I don't know much about fish.

JelteF commented 7 years ago

If you want to install it to test it locally you can probably simply do something like:

apt install fish
brew install fish
# or whatever package manager you use

probably something like this should work

set -l vgr $VIRTUALGO_ROOT
if <check if vgr is empty> 
    set vgr ~/.virtualgo
end

zsh and bash worked fine btw.

glasser commented 7 years ago

I'm going to have to be honest and say I probably am not going to finish this PR.

JelteF commented 7 years ago

Alright, thanks for the info and the start at least. If you leave it open I'll try to fix it myself at some point.

JelteF commented 6 years ago

closing this in favor if #42

JelteF commented 6 years ago

thanks for the initial work. The only bug actually was that you forgot a . in the fish code. Needed this myself now, so fixed that.