aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorNojus Gudinavičius <nojus.gudinavicius@gmail.com>2023-10-22 19:54:48 +0300
committerRobin Jarry <robin@jarry.cc>2023-10-24 22:55:40 +0200
commit4ceafd0b7b71bd934a0f15c1139ed74d0a518b70 (patch)
tree69a90cf7bff1b6b6c2db9f45ace3a66e0d8916ef /commands
parentcbc43e891a8e7ada2c95bd4a2a161facb5156516 (diff)
downloadaerc-4ceafd0b7b71bd934a0f15c1139ed74d0a518b70.tar.gz
commands: add :suspend
Add :suspend to suspend the aerc process, returning to shell. Include documentation and default Ctrl-z keybinding for it. Changelog-added: New `:suspend` command bound to `<C-z>` by default. Signed-off-by: Nojus Gudinavičius <nojus.gudinavicius@gmail.com> Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands')
-rw-r--r--commands/suspend.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/commands/suspend.go b/commands/suspend.go
new file mode 100644
index 00000000..80d59028
--- /dev/null
+++ b/commands/suspend.go
@@ -0,0 +1,22 @@
+package commands
+
+import "git.sr.ht/~rjarry/aerc/lib/ui"
+
+type Suspend struct{}
+
+func init() {
+ register(Suspend{})
+}
+
+func (Suspend) Aliases() []string {
+ return []string{"suspend"}
+}
+
+func (Suspend) Complete(args []string) []string {
+ return nil
+}
+
+func (Suspend) Execute(args []string) error {
+ ui.QueueSuspend()
+ return nil
+}