aboutsummaryrefslogtreecommitdiffstats
path: root/commands/echo.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/echo.go')
-rw-r--r--commands/echo.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/commands/echo.go b/commands/echo.go
new file mode 100644
index 00000000..ebe997da
--- /dev/null
+++ b/commands/echo.go
@@ -0,0 +1,26 @@
+package commands
+
+import (
+ "git.sr.ht/~rjarry/aerc/app"
+)
+
+type Echo struct {
+ Template string `opt:"..." required:"false"`
+}
+
+func init() {
+ Register(Echo{})
+}
+
+func (Echo) Aliases() []string {
+ return []string{"echo"}
+}
+
+func (Echo) Context() CommandContext {
+ return GLOBAL
+}
+
+func (e Echo) Execute(args []string) error {
+ app.PushSuccess(e.Template)
+ return nil
+}