"added system path execution"
This commit is contained in:
parent
789d268ee6
commit
c198640510
13
main.go
13
main.go
@ -154,7 +154,18 @@ func gosh_process_input(sh *types.Shell, input string) {
|
|||||||
default:
|
default:
|
||||||
|
|
||||||
if !check_pathes(sh, parts[0], parts[1:]) {
|
if !check_pathes(sh, parts[0], parts[1:]) {
|
||||||
fmt.Println("Unknown command:", parts[0])
|
|
||||||
|
comd := exec.Command(parts[0], parts[1:]...)
|
||||||
|
|
||||||
|
out, err := comd.Output()
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
fmt.Print("Error: ")
|
||||||
|
color.Red(err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Println(string(out))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user