Compare commits

..

No commits in common. "b86912be568fa814a5f4b42c3f5f60ec2ddf4a3d" and "2c2eb8d69a760f45fbdfba7d0b670f0c02417631" have entirely different histories.

2 changed files with 5 additions and 9 deletions

10
lua.go
View File

@ -123,14 +123,10 @@ func hshalias(L *lua.LState) int {
} }
func hshappendPath(L *lua.LState) int { func hshappendPath(L *lua.LState) int {
dir := L.CheckString(1) path := L.CheckString(1)
dir = strings.Replace(dir, "~", curuser.HomeDir, 1) path = strings.Replace(path, "~", curuser.HomeDir, 1)
pathenv := os.Getenv("PATH")
// if dir isnt already in $PATH, add it os.Setenv("PATH", os.Getenv("PATH") + ":" + path)
if !strings.Contains(pathenv, dir) {
os.Setenv("PATH", pathenv + ":" + dir)
}
return 0 return 0
} }

View File

@ -18,7 +18,7 @@ import (
"golang.org/x/term" "golang.org/x/term"
) )
var version = "v0.4.0" var version = "v0.4.1-dev.9"
var ( var (
l *lua.LState l *lua.LState
@ -174,7 +174,7 @@ func ContinuePrompt(prev string) (string, error) {
} }
cont = strings.TrimSpace(cont) cont = strings.TrimSpace(cont)
return prev + strings.TrimSuffix(cont, "\n"), nil return prev + " " + strings.TrimSuffix(cont, "\n"), nil
} }
// This semi cursed function formats our prompt (obviously) // This semi cursed function formats our prompt (obviously)