diff --git a/pty.go b/pty.go index 7c782b8..f0dd10a 100644 --- a/pty.go +++ b/pty.go @@ -6,6 +6,7 @@ package main import ( "bytes" "context" + "fmt" "io" "os" "os/exec" @@ -49,5 +50,8 @@ func executeCommand(config Config) (string, error) { if err != nil { return "", err } + if config.ShowCmd { + return fmt.Sprintf("%s\n\n%s", config.Execute, out.String()), nil + } return out.String(), nil }