mirror of https://github.com/Hilbis/Hilbish
feat: replace /home/sammy with $HOME
parent
22d744bd59
commit
8234f7b497
4
main.go
4
main.go
|
@ -19,7 +19,7 @@ import (
|
||||||
"layeh.com/gopher-luar"
|
"layeh.com/gopher-luar"
|
||||||
)
|
)
|
||||||
|
|
||||||
const version = "0.0.6"
|
const version = "0.0.8"
|
||||||
var l *lua.LState
|
var l *lua.LState
|
||||||
var prompt string
|
var prompt string
|
||||||
var commands = map[string]bool{}
|
var commands = map[string]bool{}
|
||||||
|
@ -77,6 +77,8 @@ func main() {
|
||||||
quoted = !quoted
|
quoted = !quoted
|
||||||
// dont add back quotes
|
// dont add back quotes
|
||||||
//sb.WriteRune(r)
|
//sb.WriteRune(r)
|
||||||
|
} else if r == '~' {
|
||||||
|
sb.WriteString(os.Getenv("HOME"))
|
||||||
} else if !quoted && r == ' ' {
|
} else if !quoted && r == ' ' {
|
||||||
cmdArgs = append(cmdArgs, sb.String())
|
cmdArgs = append(cmdArgs, sb.String())
|
||||||
sb.Reset()
|
sb.Reset()
|
||||||
|
|
Loading…
Reference in New Issue