From 7cd66d77606883bbfee565a175e4711dc5f48693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lker=20G=2E=20=C3=96zt=C3=BCrk?= Date: Mon, 5 Jul 2021 12:35:57 +0300 Subject: [PATCH] chore(cmd): manually order command list (#1329) * chore(cmd): manually order command list * chore --- starport/cmd/chain.go | 2 +- starport/cmd/cmd.go | 10 +++++++--- starport/cmd/scaffold.go | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/starport/cmd/chain.go b/starport/cmd/chain.go index cde1c01961..c24f28f6c2 100644 --- a/starport/cmd/chain.go +++ b/starport/cmd/chain.go @@ -12,9 +12,9 @@ func NewChain() *cobra.Command { Args: cobra.ExactArgs(1), } - c.AddCommand(NewChainInit()) c.AddCommand(NewChainServe()) c.AddCommand(NewChainBuild()) + c.AddCommand(NewChainInit()) c.AddCommand(NewChainFaucet()) return c diff --git a/starport/cmd/cmd.go b/starport/cmd/cmd.go index 856b6fcf6d..3272ba84ce 100644 --- a/starport/cmd/cmd.go +++ b/starport/cmd/cmd.go @@ -27,6 +27,8 @@ var ( // New creates a new root command for `starport` with its sub commands. func New() *cobra.Command { + cobra.EnableCommandSorting = false + c := &cobra.Command{ Use: "starport", Short: "A developer tool for building Cosmos SDK blockchains", @@ -36,15 +38,17 @@ func New() *cobra.Command { return goenv.ConfigurePath() }, } + c.AddCommand(NewScaffold()) c.AddCommand(NewChain()) c.AddCommand(NewGenerate()) - c.AddCommand(NewDocs()) - c.AddCommand(NewRelayer()) - c.AddCommand(NewVersion()) c.AddCommand(NewNetwork()) + c.AddCommand(NewRelayer()) c.AddCommand(NewTools()) + c.AddCommand(NewDocs()) + c.AddCommand(NewVersion()) c.AddCommand(deprecated()...) + return c } diff --git a/starport/cmd/scaffold.go b/starport/cmd/scaffold.go index 2e4ffda631..5f341cde61 100644 --- a/starport/cmd/scaffold.go +++ b/starport/cmd/scaffold.go @@ -20,14 +20,14 @@ func NewScaffold() *cobra.Command { } c.AddCommand(NewScaffoldChain()) - c.AddCommand(NewScaffoldQuery()) c.AddCommand(NewScaffoldModule()) - c.AddCommand(NewScaffoldWasm()) - c.AddCommand(NewScaffoldPacket()) - c.AddCommand(NewScaffoldMessage()) c.AddCommand(NewScaffoldList()) c.AddCommand(NewScaffoldMap()) + c.AddCommand(NewScaffoldMessage()) + c.AddCommand(NewScaffoldQuery()) + c.AddCommand(NewScaffoldPacket()) c.AddCommand(NewScaffoldVue()) + c.AddCommand(NewScaffoldWasm()) return c }