feat: re-add apps and config cli aliases

This better follows Heroku's output and is more useful to users. The subcommands will be treated as the primary, documented versions, while the aliases are there for convenience.

Closes #5362
This commit is contained in:
Jose Diaz-Gonzalez
2023-07-02 05:48:09 -04:00
parent 1d0d050596
commit 798a413096
4 changed files with 22 additions and 6 deletions

View File

@@ -7,6 +7,7 @@ import (
"strconv"
"strings"
"github.com/dokku/dokku/plugins/apps"
"github.com/dokku/dokku/plugins/common"
)
@@ -37,7 +38,15 @@ func main() {
cmd := flag.Arg(0)
switch cmd {
case "apps", "apps:help":
case "apps":
args := flag.NewFlagSet("apps", flag.ExitOnError)
args.Usage = usage
args.Parse(os.Args[2:])
if err := apps.CommandList(); err != nil {
common.LogFailWithError(err)
}
case "apps:help":
usage()
case "help":
command := common.NewShellCmd(fmt.Sprintf("ps -o command= %d", os.Getppid()))