Commit Graph

7 Commits (5b29d3c6e6eade05aae8dc30fefaf4459a324e0d)

Author SHA1 Message Date
cornfeedhobo e690f21e4e
Ensure goenv and go play together well
This PR seeks to address several issues surrounding the go and goenv plugins.
The nature of goenv allows for a situation where the initial shell does not
point to a working go binary, and instead at the included shim script. The
result is that one must run reload after moving to a project directory with a
version file, however in doing so, PATH is updated, requiring they exit the
shell or risk lookup collisions and unexpected behavior.

This is solved by using preexec to check the version before changing
directories and restarting the shell if the version has changed. The exec
pattern is copied from _bash-it-restart, but is edited to support this specific
use case.

Additionally, tests have been uploaded and these are now being linted.
2021-02-04 23:51:17 -06:00
cornfeedhobo 377f02714d Simplify multiple path support in go plugin (#1284)
* simplify wrapped pathmunge logic. update tests to account for cases with spaces in $PATH.
2019-11-20 08:49:34 +01:00
cornfeedhobo 3645305644
add go plugin tests and update list reversal logic 2018-12-06 17:07:03 -05:00
cornfeedhobo 4ff305c009
add multiple path support to go plugin 2018-11-09 18:55:19 -05:00
Enze Chi 502de11c2f Use go binary to get default GOROOT and GOPATH 2018-10-18 10:57:54 +11:00
Tanzeeb Khalili 0cef421c97 Change default $GOPATH to $HOME/go
As of Go v1.8, $HOME/go is the default $GOPATH. See https://github.com/golang/go/issues/17262 for the discussion.
2017-10-14 02:13:55 -04:00
MunifTanjim a0f14898c9 add go plugin 2016-11-19 22:33:11 +06:00