mirror of https://github.com/Hilbis/Hilbish
wip: get prompt from format function
parent
4a08ab7837
commit
c5fa238156
6
main.go
6
main.go
|
@ -83,7 +83,7 @@ func main() {
|
||||||
|
|
||||||
//fmt.Printf(prompt)
|
//fmt.Printf(prompt)
|
||||||
|
|
||||||
cmdString, err := readline.String(prompt)
|
cmdString, err := readline.String(fmtPrompt())
|
||||||
if err == io.EOF {
|
if err == io.EOF {
|
||||||
fmt.Println("")
|
fmt.Println("")
|
||||||
break
|
break
|
||||||
|
@ -135,6 +135,10 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func fmtPrompt() string {
|
||||||
|
return prompt
|
||||||
|
}
|
||||||
|
|
||||||
func splitInput(input string) []string {
|
func splitInput(input string) []string {
|
||||||
quoted := false
|
quoted := false
|
||||||
cmdArgs := []string{}
|
cmdArgs := []string{}
|
||||||
|
|
Loading…
Reference in New Issue