From 133085b436f56bdd48fb1aba1184811b3a278d3c Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 8 Jul 2019 18:32:31 -0400 Subject: Fix re-opening of expired pipe tabs --- commands/msg/pipe.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'commands/msg/pipe.go') diff --git a/commands/msg/pipe.go b/commands/msg/pipe.go index 158f9ea..6f8c616 100644 --- a/commands/msg/pipe.go +++ b/commands/msg/pipe.go @@ -91,10 +91,14 @@ func (_ Pipe) Execute(aerc *widgets.Aerc, args []string) error { aerc.PushStatus(" "+err.Error(), 10*time.Second). Color(tcell.ColorDefault, tcell.ColorRed) } else { + color := tcell.ColorDefault + if ecmd.ProcessState.ExitCode() != 0 { + color = tcell.ColorRed + } aerc.PushStatus(fmt.Sprintf( - "%s: completed with status %d", args[0], + "%s: completed with status %d", cmd[0], ecmd.ProcessState.ExitCode()), 10*time.Second). - Color(tcell.ColorDefault, tcell.ColorDefault) + Color(tcell.ColorDefault, color) } } -- cgit v1.2.3