Repository: gohugoio/hugo (language: go)

Issue:
Panic on "hugo serve"
<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Hugo are you using (`hugo version`)?

<pre>
$ hugo version
hugo v0.113.0+extended darwin/amd64 BuildDate=unknown
</pre>

### Does this issue reproduce with the latest release?

Yes (v0.113.0)

### Description

Though I'm not sure if it's still supported, Hugo has [an alias "serve" for "server"](https://github.com/gohugoio/hugo/blob/v0.113.0/commands/server.go#L523).

```
$ hugo server --help | grep -A2 Aliases: 2>&1
Aliases:
  server, serve
```

But "hugo serve" has consistently failed with a panic since v0.113.0. It seems that [the simplecobra does not support aliases](https://github.com/bep/simplecobra/blob/v0.3.1/simplecobra.go#L232).

```
Press Ctrl+C to stop
^Cpanic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
github.com/bep/simplecobra.checkArgs(0xc0004c6600, {0xc000134010?, 0x1, 0xc000692060?})
        github.com/bep/simplecobra@v0.3.1/simplecobra.go:236 +0x1f5
github.com/bep/simplecobra.(*Exec).Execute(0xc0000141e8, {0x102603d38?, 0xc000126018?}, {0xc000134010?, 0x100043528?, 0xc0001005e8?})
        github.com/bep/simplecobra@v0.3.1/simplecobra.go:159 +0x107
github.com/gohugoio/hugo/commands.Execute({0xc000134010, 0x1, 0x1})
        github.com/gohugoio/hugo/commands/commandeer.go:66 +0x312
main.main()
        github.com/gohugoio/hugo/main.go:25 +0x65
```



Discussion / hints:

Fix patch:
diff --git a/go.mod b/go.mod
index ebff13d74db..c06dd81369f 100644
--- a/go.mod
+++ b/go.mod
@@ -18,7 +18,7 @@ require (
 	github.com/bep/lazycache v0.2.0
 	github.com/bep/mclib v1.20400.20402
 	github.com/bep/overlayfs v0.6.0
-	github.com/bep/simplecobra v0.3.1
+	github.com/bep/simplecobra v0.3.2
 	github.com/bep/tmc v0.5.1
 	github.com/clbanning/mxj/v2 v2.5.7
 	github.com/cli/safeexec v1.0.1
diff --git a/go.sum b/go.sum
index f9e095f4c44..3211c5e487b 100644
--- a/go.sum
+++ b/go.sum
@@ -186,6 +186,8 @@ github.com/bep/overlayfs v0.6.0 h1:sgLcq/qtIzbaQNl2TldGXOkHvqeZB025sPvHOQL+DYo=
 github.com/bep/overlayfs v0.6.0/go.mod h1:NFjSmn3kCqG7KX2Lmz8qT8VhPPCwZap3UNogXawoQHM=
 github.com/bep/simplecobra v0.3.1 h1:Ms9BucXcJRiGbPYpaJyxItYceQN/pvEZ0+V1+cUcsZ4=
 github.com/bep/simplecobra v0.3.1/go.mod h1:EOp6bCKuuHmwA9bQcRC8LcDB60co2Cmht5X4xMIOwf0=
+github.com/bep/simplecobra v0.3.2 h1:dVcflWm7l31zxV8QUrJqQ/de/satzqY8ukq0aL0pZDE=
+github.com/bep/simplecobra v0.3.2/go.mod h1:EOp6bCKuuHmwA9bQcRC8LcDB60co2Cmht5X4xMIOwf0=
 github.com/bep/tmc v0.5.1 h1:CsQnSC6MsomH64gw0cT5f+EwQDcvZz4AazKunFwTpuI=
 github.com/bep/tmc v0.5.1/go.mod h1:tGYHN8fS85aJPhDLgXETVKp+PR382OvFi2+q2GkGsq0=
 github.com/bep/workers v1.0.0 h1:U+H8YmEaBCEaFZBst7GcRVEoqeRC9dzH2dWOwGmOchg=


Test patch:
diff --git a/testscripts/commands/server_render_to_memory.txt b/testscripts/commands/server_render_to_memory.txt
index 53ab74aa514..368efe41d11 100644
--- a/testscripts/commands/server_render_to_memory.txt
+++ b/testscripts/commands/server_render_to_memory.txt
@@ -1,7 +1,8 @@
 # Test the hugo server command.
 
 # We run these tests in parallel so let Hugo decide which port to use.
-hugo server &
+# Deliberately using the alias 'serve' here.
+hugo serve &
 
 waitServer