summary refs log tree commit diff stats
path: root/commands
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-07-08 18:22:41 -0400
committerDrew DeVault <sir@cmpwn.com>2019-07-08 18:22:41 -0400
commit6797f9347603aff0831bf56566fbf164cbdda179 (patch)
treebcd2bafafcd892216b108683fc324b6b8bfcbd93 /commands
parente1152b6a1365b54453a51560a96fcaf264d9687f (diff)
downloadaerc-6797f9347603aff0831bf56566fbf164cbdda179.tar.gz
:exec, :pipe: show exit status on completion
Diffstat (limited to 'commands')
-rw-r--r--commands/exec.go3
-rw-r--r--commands/msg/pipe.go3
2 files changed, 4 insertions, 2 deletions
diff --git a/commands/exec.go b/commands/exec.go
index 72a563d..a46b93a 100644
--- a/commands/exec.go
+++ b/commands/exec.go
@@ -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)
 		}
 	}()
diff --git a/commands/msg/pipe.go b/commands/msg/pipe.go
index 9001563..158f9ea 100644
--- a/commands/msg/pipe.go
+++ b/commands/msg/pipe.go
@@ -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)
 		}
 	}