:exec, :pipe: show exit status on completion

This commit is contained in:
Drew DeVault 2019-07-08 18:22:41 -04:00
parent e1152b6a13
commit 6797f93476
2 changed files with 4 additions and 2 deletions

View file

@ -37,7 +37,8 @@ func (_ ExecCmd) Execute(aerc *widgets.Aerc, args []string) error {
Color(tcell.ColorDefault, tcell.ColorRed)
} else {
aerc.PushStatus(fmt.Sprintf(
"%s: complete", args[0]), 10*time.Second).
"%s: completed with status %d", args[0],
cmd.ProcessState.ExitCode()), 10*time.Second).
Color(tcell.ColorDefault, tcell.ColorDefault)
}
}()

View file

@ -92,7 +92,8 @@ func (_ Pipe) Execute(aerc *widgets.Aerc, args []string) error {
Color(tcell.ColorDefault, tcell.ColorRed)
} else {
aerc.PushStatus(fmt.Sprintf(
"%s: complete", args[0]), 10*time.Second).
"%s: completed with status %d", args[0],
ecmd.ProcessState.ExitCode()), 10*time.Second).
Color(tcell.ColorDefault, tcell.ColorDefault)
}
}