diff --git a/cli/azd/cmd/cmd_help.go b/cli/azd/cmd/cmd_help.go index c070db0a93c..9a742cc77b5 100644 --- a/cli/azd/cmd/cmd_help.go +++ b/cli/azd/cmd/cmd_help.go @@ -94,17 +94,39 @@ func getCmdHelpDefaultCommands(cmd *cobra.Command) string { // getCmdHelpDefaultFlags provides the default implementation for displaying the help flags section. func getCmdHelpDefaultFlags(cmd *cobra.Command) (result string) { - if cmd.HasAvailableLocalFlags() { - flags := getFlagsDetails(cmd.LocalFlags()) + // force the following flags as global flags for display purposes when displaying help. + forceGlobalFlagNames := map[string]struct{}{ + "help": {}, + "docs": {}, + } + + forceGlobalFlags := pflag.NewFlagSet("", pflag.ContinueOnError) + localFlags := pflag.NewFlagSet("", pflag.ContinueOnError) + + cmd.LocalFlags().VisitAll(func(f *pflag.Flag) { + if _, ok := forceGlobalFlagNames[f.Name]; ok { + forceGlobalFlags.AddFlag(f) + } else { + localFlags.AddFlag(f) + } + }) + + if localFlags.HasAvailableFlags() { + details := getFlagsDetails(localFlags) result = fmt.Sprintf("%s\n%s\n", output.WithBold("%s", output.WithUnderline("Flags")), - flags) + details) } - if cmd.HasAvailableInheritedFlags() { - globalFlags := getFlagsDetails(cmd.InheritedFlags()) + + globalFlags := pflag.NewFlagSet("", pflag.ContinueOnError) + globalFlags.AddFlagSet(cmd.InheritedFlags()) + globalFlags.AddFlagSet(forceGlobalFlags) + + if globalFlags.HasAvailableFlags() { + details := getFlagsDetails(globalFlags) result += fmt.Sprintf("%s\n%s\n", output.WithBold("%s", output.WithUnderline("Global Flags")), - globalFlags) + details) } return result } diff --git a/cli/azd/cmd/testdata/TestUsage-azd-add.snap b/cli/azd/cmd/testdata/TestUsage-azd-add.snap index 65fc5bfee6d..efa5332697d 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-add.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-add.snap @@ -4,13 +4,11 @@ Add a component to your project. (Alpha) Usage azd add [flags] -Flags - --docs : Opens the documentation for azd add in your web browser. - -h, --help : Gets help for add. - Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd add in your web browser. + -h, --help : Gets help for add. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-auth-login.snap b/cli/azd/cmd/testdata/TestUsage-azd-auth-login.snap index c9e531eda87..abe6197e3f6 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-auth-login.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-auth-login.snap @@ -9,9 +9,7 @@ Flags --client-certificate string : The path to the client certificate for the service principal to authenticate with. --client-id string : The client id for the service principal to authenticate with. --client-secret string : The client secret for the service principal to authenticate with. Set to the empty string to read the value from the console. - --docs : Opens the documentation for azd auth login in your web browser. --federated-credential-provider string : The provider to use to acquire a federated token to authenticate with. - -h, --help : Gets help for login. --managed-identity : Use a managed identity to authenticate. --redirect-port int : Choose the port to be used as part of the redirect URI during interactive login. --tenant-id string : The tenant id or domain name to authenticate with. @@ -20,6 +18,8 @@ Flags Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd auth login in your web browser. + -h, --help : Gets help for login. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-auth-logout.snap b/cli/azd/cmd/testdata/TestUsage-azd-auth-logout.snap index dbea8223056..e9d42e1763d 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-auth-logout.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-auth-logout.snap @@ -4,13 +4,11 @@ Log out of Azure. Usage azd auth logout [flags] -Flags - --docs : Opens the documentation for azd auth logout in your web browser. - -h, --help : Gets help for logout. - Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd auth logout in your web browser. + -h, --help : Gets help for logout. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-auth.snap b/cli/azd/cmd/testdata/TestUsage-azd-auth.snap index e6103d6f4bd..21a262409d3 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-auth.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-auth.snap @@ -8,13 +8,11 @@ Available Commands login : Log in to Azure. logout : Log out of Azure. -Flags - --docs : Opens the documentation for azd auth in your web browser. - -h, --help : Gets help for auth. - Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd auth in your web browser. + -h, --help : Gets help for auth. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Use azd auth [command] --help to view examples and more information about a specific command. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-config-get.snap b/cli/azd/cmd/testdata/TestUsage-azd-config-get.snap index 9140907ba78..4b448e83cd5 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-config-get.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-config-get.snap @@ -4,13 +4,11 @@ Gets a configuration. Usage azd config get [flags] -Flags - --docs : Opens the documentation for azd config get in your web browser. - -h, --help : Gets help for get. - Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd config get in your web browser. + -h, --help : Gets help for get. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-config-list-alpha.snap b/cli/azd/cmd/testdata/TestUsage-azd-config-list-alpha.snap index fe388c52716..8aa1c17ba52 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-config-list-alpha.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-config-list-alpha.snap @@ -4,13 +4,11 @@ Display the list of available features in alpha stage. Usage azd config list-alpha [flags] -Flags - --docs : Opens the documentation for azd config list-alpha in your web browser. - -h, --help : Gets help for list-alpha. - Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd config list-alpha in your web browser. + -h, --help : Gets help for list-alpha. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Examples diff --git a/cli/azd/cmd/testdata/TestUsage-azd-config-reset.snap b/cli/azd/cmd/testdata/TestUsage-azd-config-reset.snap index 6ad8eee995a..722dfa56af7 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-config-reset.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-config-reset.snap @@ -5,13 +5,13 @@ Usage azd config reset [flags] Flags - --docs : Opens the documentation for azd config reset in your web browser. -f, --force : Force reset without confirmation. - -h, --help : Gets help for reset. Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd config reset in your web browser. + -h, --help : Gets help for reset. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-config-set.snap b/cli/azd/cmd/testdata/TestUsage-azd-config-set.snap index e0b76b40992..779d3efc993 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-config-set.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-config-set.snap @@ -4,13 +4,11 @@ Sets a configuration. Usage azd config set [flags] -Flags - --docs : Opens the documentation for azd config set in your web browser. - -h, --help : Gets help for set. - Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd config set in your web browser. + -h, --help : Gets help for set. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-config-show.snap b/cli/azd/cmd/testdata/TestUsage-azd-config-show.snap index 2fb607c6f14..b4970a7919f 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-config-show.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-config-show.snap @@ -4,13 +4,11 @@ Show all the configuration values. Usage azd config show [flags] -Flags - --docs : Opens the documentation for azd config show in your web browser. - -h, --help : Gets help for show. - Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd config show in your web browser. + -h, --help : Gets help for show. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-config-unset.snap b/cli/azd/cmd/testdata/TestUsage-azd-config-unset.snap index 500f1ac649e..3eecd9cd7f2 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-config-unset.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-config-unset.snap @@ -4,13 +4,11 @@ Unsets a configuration. Usage azd config unset [flags] -Flags - --docs : Opens the documentation for azd config unset in your web browser. - -h, --help : Gets help for unset. - Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd config unset in your web browser. + -h, --help : Gets help for unset. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-config.snap b/cli/azd/cmd/testdata/TestUsage-azd-config.snap index 26fc3cd2ecb..671d9e0476d 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-config.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-config.snap @@ -16,13 +16,11 @@ Available Commands show : Show all the configuration values. unset : Unsets a configuration. -Flags - --docs : Opens the documentation for azd config in your web browser. - -h, --help : Gets help for config. - Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd config in your web browser. + -h, --help : Gets help for config. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Use azd config [command] --help to view examples and more information about a specific command. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-deploy.snap b/cli/azd/cmd/testdata/TestUsage-azd-deploy.snap index 2b67a55544c..5f603e45d54 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-deploy.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-deploy.snap @@ -10,14 +10,14 @@ Usage Flags --all : Deploys all services that are listed in azure.yaml - --docs : Opens the documentation for azd deploy in your web browser. -e, --environment string : The name of the environment to use. --from-package string : Deploys the application from an existing package. - -h, --help : Gets help for deploy. Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd deploy in your web browser. + -h, --help : Gets help for deploy. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Examples diff --git a/cli/azd/cmd/testdata/TestUsage-azd-down.snap b/cli/azd/cmd/testdata/TestUsage-azd-down.snap index a0195420330..f29b692ce83 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-down.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-down.snap @@ -5,15 +5,15 @@ Usage azd down [flags] Flags - --docs : Opens the documentation for azd down in your web browser. -e, --environment string : The name of the environment to use. --force : Does not require confirmation before it deletes resources. - -h, --help : Gets help for down. --purge : Does not require confirmation before it permanently deletes resources that are soft-deleted by default (for example, key vaults). Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd down in your web browser. + -h, --help : Gets help for down. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Examples diff --git a/cli/azd/cmd/testdata/TestUsage-azd-env-get-value.snap b/cli/azd/cmd/testdata/TestUsage-azd-env-get-value.snap index 5bc02856194..fc6d79d8ef2 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-env-get-value.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-env-get-value.snap @@ -5,13 +5,13 @@ Usage azd env get-value [flags] Flags - --docs : Opens the documentation for azd env get-value in your web browser. -e, --environment string : The name of the environment to use. - -h, --help : Gets help for get-value. Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd env get-value in your web browser. + -h, --help : Gets help for get-value. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-env-get-values.snap b/cli/azd/cmd/testdata/TestUsage-azd-env-get-values.snap index 1ab3c5e4387..7c8296ba56d 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-env-get-values.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-env-get-values.snap @@ -5,13 +5,13 @@ Usage azd env get-values [flags] Flags - --docs : Opens the documentation for azd env get-values in your web browser. -e, --environment string : The name of the environment to use. - -h, --help : Gets help for get-values. Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd env get-values in your web browser. + -h, --help : Gets help for get-values. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-env-list.snap b/cli/azd/cmd/testdata/TestUsage-azd-env-list.snap index c0504ec4c2f..9159323e8a0 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-env-list.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-env-list.snap @@ -4,13 +4,11 @@ List environments. Usage azd env list [flags] -Flags - --docs : Opens the documentation for azd env list in your web browser. - -h, --help : Gets help for list. - Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd env list in your web browser. + -h, --help : Gets help for list. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-env-new.snap b/cli/azd/cmd/testdata/TestUsage-azd-env-new.snap index ac97334bd11..91ae8cdbbd8 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-env-new.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-env-new.snap @@ -5,14 +5,14 @@ Usage azd env new [flags] Flags - --docs : Opens the documentation for azd env new in your web browser. - -h, --help : Gets help for new. -l, --location string : Azure location for the new environment --subscription string : Name or ID of an Azure subscription to use for the new environment Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd env new in your web browser. + -h, --help : Gets help for new. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-env-refresh.snap b/cli/azd/cmd/testdata/TestUsage-azd-env-refresh.snap index 6eab5db918c..dcf4cebe0a8 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-env-refresh.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-env-refresh.snap @@ -5,14 +5,14 @@ Usage azd env refresh [flags] Flags - --docs : Opens the documentation for azd env refresh in your web browser. -e, --environment string : The name of the environment to use. - -h, --help : Gets help for refresh. --hint string : Hint to help identify the environment to refresh Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd env refresh in your web browser. + -h, --help : Gets help for refresh. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-env-select.snap b/cli/azd/cmd/testdata/TestUsage-azd-env-select.snap index 3d2234b42de..a30b0d792a9 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-env-select.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-env-select.snap @@ -4,13 +4,11 @@ Set the default environment. Usage azd env select [flags] -Flags - --docs : Opens the documentation for azd env select in your web browser. - -h, --help : Gets help for select. - Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd env select in your web browser. + -h, --help : Gets help for select. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-env-set.snap b/cli/azd/cmd/testdata/TestUsage-azd-env-set.snap index 955650023ef..b1267496cdc 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-env-set.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-env-set.snap @@ -5,13 +5,13 @@ Usage azd env set [flags] Flags - --docs : Opens the documentation for azd env set in your web browser. -e, --environment string : The name of the environment to use. - -h, --help : Gets help for set. Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd env set in your web browser. + -h, --help : Gets help for set. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-env.snap b/cli/azd/cmd/testdata/TestUsage-azd-env.snap index 18a3a3fed47..c5bd460cfa0 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-env.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-env.snap @@ -18,13 +18,11 @@ Available Commands select : Set the default environment. set : Manage your environment settings. -Flags - --docs : Opens the documentation for azd env in your web browser. - -h, --help : Gets help for env. - Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd env in your web browser. + -h, --help : Gets help for env. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Use azd env [command] --help to view examples and more information about a specific command. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-hooks-run.snap b/cli/azd/cmd/testdata/TestUsage-azd-hooks-run.snap index aff4cf2013d..323709bfe38 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-hooks-run.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-hooks-run.snap @@ -5,15 +5,15 @@ Usage azd hooks run [flags] Flags - --docs : Opens the documentation for azd hooks run in your web browser. -e, --environment string : The name of the environment to use. - -h, --help : Gets help for run. --platform string : Forces hooks to run for the specified platform. --service string : Only runs hooks for the specified service. Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd hooks run in your web browser. + -h, --help : Gets help for run. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-hooks.snap b/cli/azd/cmd/testdata/TestUsage-azd-hooks.snap index cdd7cc09bc6..28c8d7056d4 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-hooks.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-hooks.snap @@ -7,13 +7,11 @@ Usage Available Commands run : Runs the specified hook for the project and services -Flags - --docs : Opens the documentation for azd hooks in your web browser. - -h, --help : Gets help for hooks. - Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd hooks in your web browser. + -h, --help : Gets help for hooks. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Use azd hooks [command] --help to view examples and more information about a specific command. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-init.snap b/cli/azd/cmd/testdata/TestUsage-azd-init.snap index 9fe4488b108..b92a303ef5b 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-init.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-init.snap @@ -9,11 +9,9 @@ Usage Flags -b, --branch string : The template branch to initialize from. Must be used with a template argument (--template or -t). - --docs : Opens the documentation for azd init in your web browser. -e, --environment string : The name of the environment to use. -f, --filter strings : The tag(s) used to filter template results. Supports comma-separated values. --from-code : Initializes a new application from your existing code. - -h, --help : Gets help for init. -l, --location string : Azure location for the new environment -s, --subscription string : Name or ID of an Azure subscription to use for the new environment -t, --template string : Initializes a new application from a template. You can use Full URI, /, or if it's part of the azure-samples organization. @@ -21,6 +19,8 @@ Flags Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd init in your web browser. + -h, --help : Gets help for init. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Examples diff --git a/cli/azd/cmd/testdata/TestUsage-azd-monitor.snap b/cli/azd/cmd/testdata/TestUsage-azd-monitor.snap index 231daf2591b..b3a61421a00 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-monitor.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-monitor.snap @@ -5,9 +5,7 @@ Usage azd monitor [flags] Flags - --docs : Opens the documentation for azd monitor in your web browser. -e, --environment string : The name of the environment to use. - -h, --help : Gets help for monitor. --live : Open a browser to Application Insights Live Metrics. Live Metrics is currently not supported for Python apps. --logs : Open a browser to Application Insights Logs. --overview : Open a browser to Application Insights Overview Dashboard. @@ -15,6 +13,8 @@ Flags Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd monitor in your web browser. + -h, --help : Gets help for monitor. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Examples diff --git a/cli/azd/cmd/testdata/TestUsage-azd-package.snap b/cli/azd/cmd/testdata/TestUsage-azd-package.snap index b0c143d2556..46e5ed27b47 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-package.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-package.snap @@ -10,14 +10,14 @@ Usage Flags --all : Packages all services that are listed in azure.yaml - --docs : Opens the documentation for azd package in your web browser. -e, --environment string : The name of the environment to use. - -h, --help : Gets help for package. --output-path string : File or folder path where the generated packages will be saved. Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd package in your web browser. + -h, --help : Gets help for package. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Examples diff --git a/cli/azd/cmd/testdata/TestUsage-azd-pipeline-config.snap b/cli/azd/cmd/testdata/TestUsage-azd-pipeline-config.snap index 57d8485a8d3..00371f49934 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-pipeline-config.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-pipeline-config.snap @@ -11,9 +11,7 @@ Usage Flags -m, --applicationServiceManagementReference string : Service Management Reference. References application or service contact information from a Service or Asset Management database. This value must be a Universally Unique Identifier (UUID). You can set this value globally by running azd config set pipeline.config.applicationServiceManagementReference . --auth-type string : The authentication type used between the pipeline provider and Azure for deployment (Only valid for GitHub provider). Valid values: federated, client-credentials. - --docs : Opens the documentation for azd pipeline config in your web browser. -e, --environment string : The name of the environment to use. - -h, --help : Gets help for config. --principal-id string : The client id of the service principal to use to grant access to Azure resources as part of the pipeline. --principal-name string : The name of the service principal to use to grant access to Azure resources as part of the pipeline. --principal-role stringArray : The roles to assign to the service principal. By default the service principal will be granted the Contributor and User Access Administrator roles. @@ -23,6 +21,8 @@ Flags Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd pipeline config in your web browser. + -h, --help : Gets help for config. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Examples diff --git a/cli/azd/cmd/testdata/TestUsage-azd-pipeline.snap b/cli/azd/cmd/testdata/TestUsage-azd-pipeline.snap index 3c0b864afb6..c53e22d3311 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-pipeline.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-pipeline.snap @@ -11,13 +11,11 @@ Usage Available Commands config : Configure your deployment pipeline to connect securely to Azure. (Beta) -Flags - --docs : Opens the documentation for azd pipeline in your web browser. - -h, --help : Gets help for pipeline. - Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd pipeline in your web browser. + -h, --help : Gets help for pipeline. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Use azd pipeline [command] --help to view examples and more information about a specific command. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-provision.snap b/cli/azd/cmd/testdata/TestUsage-azd-provision.snap index 8c057e16609..3a8c2942df0 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-provision.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-provision.snap @@ -10,15 +10,15 @@ Usage azd provision [flags] Flags - --docs : Opens the documentation for azd provision in your web browser. -e, --environment string : The name of the environment to use. - -h, --help : Gets help for provision. --no-state : Do not use latest Deployment State (bicep only). --preview : Preview changes to Azure resources. Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd provision in your web browser. + -h, --help : Gets help for provision. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-restore.snap b/cli/azd/cmd/testdata/TestUsage-azd-restore.snap index 18b6ff1fd32..7c571438a97 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-restore.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-restore.snap @@ -9,13 +9,13 @@ Usage Flags --all : Restores all services that are listed in azure.yaml - --docs : Opens the documentation for azd restore in your web browser. -e, --environment string : The name of the environment to use. - -h, --help : Gets help for restore. Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd restore in your web browser. + -h, --help : Gets help for restore. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Examples diff --git a/cli/azd/cmd/testdata/TestUsage-azd-show.snap b/cli/azd/cmd/testdata/TestUsage-azd-show.snap index 32750987fad..a7477e56c9a 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-show.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-show.snap @@ -5,14 +5,14 @@ Usage azd show [flags] Flags - --docs : Opens the documentation for azd show in your web browser. -e, --environment string : The name of the environment to use. - -h, --help : Gets help for show. --show-secrets : Unmask secrets in output. Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd show in your web browser. + -h, --help : Gets help for show. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-template-list.snap b/cli/azd/cmd/testdata/TestUsage-azd-template-list.snap index f6d7c2e4457..c02d3e7ecc0 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-template-list.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-template-list.snap @@ -5,14 +5,14 @@ Usage azd template list [flags] Flags - --docs : Opens the documentation for azd template list in your web browser. -f, --filter strings : The tag(s) used to filter template results. Supports comma-separated values. - -h, --help : Gets help for list. -s, --source string : Filters templates by source. Global Flags -C, --cwd string : Sets the current working directory. --debug : Enables debugging and diagnostics logging. + --docs : Opens the documentation for azd template list in your web browser. + -h, --help : Gets help for list. --no-prompt : Accepts the default value instead of prompting, or it fails if there is no default. Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats. diff --git a/cli/azd/cmd/testdata/TestUsage-azd-template-show.snap b/cli/azd/cmd/testdata/TestUsage-azd-template-show.snap index 2138d3a0de3..328c50b52d0 100644 --- a/cli/azd/cmd/testdata/TestUsage-azd-template-show.snap +++ b/cli/azd/cmd/testdata/TestUsage-azd-template-show.snap @@ -4,13 +4,11 @@ Show details for a given template. (Beta) Usage azd template show