aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorinwit <inwit@sindominio.net>2023-09-28 21:23:19 +0200
committerRobin Jarry <robin@jarry.cc>2023-10-13 00:32:22 +0200
commit0d5443b36e4cf3f74b8334b4734ded7176c026be (patch)
treed3e33312c45a785f80b950cfebcbdc3f03a73df5 /commands
parent14baf17f4bd47377403c5d965c1fe294d2ec6ef0 (diff)
downloadaerc-0d5443b36e4cf3f74b8334b4734ded7176c026be.tar.gz
split: add an alias for horizontal split
To date, there are two orthogonal commands named :vsplit and :split, which create a vertical and a horizontal split, respectively. Add a :hsplit alias for the latter. Signed-Off-By: inwit <inwit@sindominio.net> Acked-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'commands')
-rw-r--r--commands/account/split.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/commands/account/split.go b/commands/account/split.go
index ddc79e2f..4a17b8b2 100644
--- a/commands/account/split.go
+++ b/commands/account/split.go
@@ -15,7 +15,7 @@ func init() {
}
func (Split) Aliases() []string {
- return []string{"split", "vsplit"}
+ return []string{"split", "vsplit", "hsplit"}
}
func (Split) Complete(args []string) []string {
@@ -24,7 +24,7 @@ func (Split) Complete(args []string) []string {
func (Split) Execute(args []string) error {
if len(args) > 2 {
- return errors.New("Usage: [v]split n")
+ return errors.New("Usage: [v|h]split n")
}
acct := app.SelectedAccount()
if acct == nil {
@@ -51,7 +51,7 @@ func (Split) Execute(args []string) error {
}
n, err = strconv.Atoi(args[1])
if err != nil {
- return errors.New("Usage: [v]split n")
+ return errors.New("Usage: [v|h]split n")
}
if delta {
n = acct.SplitSize() + n
@@ -69,7 +69,7 @@ func (Split) Execute(args []string) error {
n = 1
}
switch args[0] {
- case "split":
+ case "split", "hsplit":
return acct.Split(n)
case "vsplit":
return acct.Vsplit(n)