diff --git a/kak/send.go b/kak/send.go index 0ca021e..76381e2 100644 --- a/kak/send.go +++ b/kak/send.go @@ -7,7 +7,11 @@ import ( ) func Send(kctx *Context, command string) error { - cmd := exec.Command("kak", "-p", kctx.Session.Name) + kakExec, err := kakExec() + if err != nil { + return err + } + cmd := exec.Command(kakExec, "-p", kctx.Session.Name) // cmd.Stdout = os.Stdout // cmd.Stderr = os.Stderr diff --git a/kak/start.go b/kak/start.go index 9632856..13ead84 100644 --- a/kak/start.go +++ b/kak/start.go @@ -17,7 +17,12 @@ func Start(name string) (sessionName string, err error) { } } - cmd := exec.Command("kak", "-s", sessionName, "-d") + kakExec, err := kakExec() + if err != nil { + return + } + + cmd := exec.Command(kakExec, "-s", sessionName, "-d") err = cmd.Start() if err != nil {