|
|
@ -4,7 +4,6 @@ package main |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"fmt" |
|
|
|
"fmt" |
|
|
|
"os/exec" |
|
|
|
|
|
|
|
"strings" |
|
|
|
"strings" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -38,8 +37,7 @@ func cmdExec(cmd []string) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func runKeybaseExec(args []string) { |
|
|
|
func runKeybaseExec(args []string) { |
|
|
|
cmd := exec.Command("keybase", args...) |
|
|
|
outputBytes, err := k.Exec(args...) |
|
|
|
output, err := cmd.CombinedOutput() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
printToView("Feed", fmt.Sprintf("Exec error: %+v", err)) |
|
|
|
printToView("Feed", fmt.Sprintf("Exec error: %+v", err)) |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -47,6 +45,7 @@ func runKeybaseExec(args []string) { |
|
|
|
// unjoin the chat
|
|
|
|
// unjoin the chat
|
|
|
|
clearView("Chat") |
|
|
|
clearView("Chat") |
|
|
|
setViewTitle("Input", fmt.Sprintf(" /exec %s ", strings.Join(args, " "))) |
|
|
|
setViewTitle("Input", fmt.Sprintf(" /exec %s ", strings.Join(args, " "))) |
|
|
|
|
|
|
|
output := string(outputBytes) |
|
|
|
printToView("Chat", fmt.Sprintf("%s", output)) |
|
|
|
printToView("Chat", fmt.Sprintf("%s", output)) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|