aboutsummaryrefslogtreecommitdiff
path: root/commands/exec.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/exec.go')
-rw-r--r--commands/exec.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/commands/exec.go b/commands/exec.go
index a46b93a..27edf5d 100644
--- a/commands/exec.go
+++ b/commands/exec.go
@@ -36,10 +36,14 @@ func (_ ExecCmd) Execute(aerc *widgets.Aerc, args []string) error {
aerc.PushStatus(" "+err.Error(), 10*time.Second).
Color(tcell.ColorDefault, tcell.ColorRed)
} else {
+ color := tcell.ColorDefault
+ if cmd.ProcessState.ExitCode() != 0 {
+ color = tcell.ColorRed
+ }
aerc.PushStatus(fmt.Sprintf(
"%s: completed with status %d", args[0],
cmd.ProcessState.ExitCode()), 10*time.Second).
- Color(tcell.ColorDefault, tcell.ColorDefault)
+ Color(tcell.ColorDefault, color)
}
}()
return nil