diff options
author | Nojus Gudinavičius <nojus.gudinavicius@gmail.com> | 2023-10-22 19:54:48 +0300 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-10-24 22:55:40 +0200 |
commit | 4ceafd0b7b71bd934a0f15c1139ed74d0a518b70 (patch) | |
tree | 69a90cf7bff1b6b6c2db9f45ace3a66e0d8916ef /commands/suspend.go | |
parent | cbc43e891a8e7ada2c95bd4a2a161facb5156516 (diff) | |
download | aerc-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/suspend.go')
-rw-r--r-- | commands/suspend.go | 22 |
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 +} |