aboutsummaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/account/delete.go (renamed from commands/account/delete-message.go)3
-rw-r--r--commands/account/next.go (renamed from commands/account/next-message.go)4
-rw-r--r--commands/account/select.go (renamed from commands/account/select-message.go)0
-rw-r--r--commands/account/view.go (renamed from commands/account/view-message.go)1
4 files changed, 6 insertions, 2 deletions
diff --git a/commands/account/delete-message.go b/commands/account/delete.go
index d6b669e..65d6eb9 100644
--- a/commands/account/delete-message.go
+++ b/commands/account/delete.go
@@ -11,12 +11,13 @@ import (
)
func init() {
+ register("delete", DeleteMessage)
register("delete-message", DeleteMessage)
}
func DeleteMessage(aerc *widgets.Aerc, args []string) error {
if len(args) != 1 {
- return errors.New("Usage: :delete-message")
+ return errors.New("Usage: :delete")
}
acct := aerc.SelectedAccount()
if acct == nil {
diff --git a/commands/account/next-message.go b/commands/account/next.go
index f13ea5a..7e8541f 100644
--- a/commands/account/next-message.go
+++ b/commands/account/next.go
@@ -10,7 +10,9 @@ import (
)
func init() {
+ register("next", NextPrevMessage)
register("next-message", NextPrevMessage)
+ register("prev", NextPrevMessage)
register("prev-message", NextPrevMessage)
}
@@ -45,7 +47,7 @@ func NextPrevMessage(aerc *widgets.Aerc, args []string) error {
n = int(float64(acct.Messages().Height()) * (float64(n) / 100.0))
}
for ; n > 0; n-- {
- if args[0] == "prev-message" {
+ if args[0] == "prev-message" || args[0] == "prev" {
acct.Messages().Prev()
} else {
acct.Messages().Next()
diff --git a/commands/account/select-message.go b/commands/account/select.go
index bd44c1b..bd44c1b 100644
--- a/commands/account/select-message.go
+++ b/commands/account/select.go
diff --git a/commands/account/view-message.go b/commands/account/view.go
index 4db5c95..40abec3 100644
--- a/commands/account/view-message.go
+++ b/commands/account/view.go
@@ -7,6 +7,7 @@ import (
)
func init() {
+ register("view", ViewMessage)
register("view-message", ViewMessage)
}