From 25ce81e88d93a8db73e6ce1f514e57b0e984fe8b Mon Sep 17 00:00:00 2001 From: Gadzhi Kharkharov Date: Sat, 18 Sep 2021 10:54:52 +0300 Subject: [PATCH] use kakexec in send and start --- kak/send.go | 6 +++++- kak/start.go | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) 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 {