Fix re-opening of expired pipe tabs
This commit is contained in:
parent
6797f93476
commit
133085b436
3 changed files with 24 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue