Skip to content

Commit

Permalink
feat(charmbracelet#100): implemented show-cmd flag
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroSuero committed Jun 2, 2024
1 parent ad248b4 commit f12ed80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pty.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package main
import (
"bytes"
"context"
"fmt"
"io"
"os"
"os/exec"
Expand Down Expand Up @@ -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
}

0 comments on commit f12ed80

Please sign in to comment.