Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename set -> switch

  • Loading branch information...
commit 7d66ac5d2c0bf8bb59181a18f30f4e12464bd20c 1 parent c7843d2
@ascarter authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 goenv
View
16 goenv
@@ -6,7 +6,7 @@ _goenv_help() {
print "\tgoenv command [arguments]\n"
print "The commands are:\n"
print "\tinit initialize path as workspace (default working directory)"
- print "\tset set workspace to path (default to working directory)"
+ print "\tswitch switch workspace to path (default to working directory)"
print "\tadd add path to workspace (default working directory)"
print "\trm remove path from workspace (default working directory)"
print "\treset reset to workspace to empty"
@@ -57,10 +57,10 @@ _goenv_init() {
fi
}
-_goenv_set() {
+_goenv_switch() {
if [[ -n "$1" && -d "$1" ]]; then
if [ -n "$GOPATH" ]; then
- _goenv_unset
+ _goenv_reset
fi
# Cache the original path
@@ -82,7 +82,7 @@ _goenv_add() {
if [[ -n "$GOPATH" && "$GOPATH" =~ (^|:)"$1"(:|$) ]]; then
print "Workspace already added"
elif [ -z "$_GOENV_OLD_PATH" ]; then
- _goenv_set $1
+ _goenv_switch $1
else
GOPATH=$GOPATH:$1
export GOPATH
@@ -150,11 +150,11 @@ _goenv_exec() {
_goenv_init `_goenv_fullpath $2`
fi
;;
- set)
+ switch)
if [ -z "$2" ]; then
- _goenv_set `_goenv_find_ws_path`
+ _goenv_switch `_goenv_find_ws_path`
else
- _goenv_set `_goenv_fullpath $2`
+ _goenv_switch `_goenv_fullpath $2`
fi
;;
add)
@@ -180,7 +180,7 @@ goenv() {
cmd=$1
case "$cmd" in
- init | set | add | rm)
+ init | switch | add | rm)
shift
while (($#)); do
_goenv_exec $cmd $1
Please sign in to comment.
Something went wrong with that request. Please try again.