Skip to content

Commit

Permalink
Merge pull request Azure#3 from PARADISSEEKR/jins-init
Browse files Browse the repository at this point in the history
Add more commands info
  • Loading branch information
zhoxing-ms authored Nov 23, 2021
2 parents ec07ee5 + 0b43611 commit 834ab6e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
29 changes: 29 additions & 0 deletions src/init/azext_init/_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,32 @@
"desc": "This is an individual walk through where you could customize a set of common configs"
}
]

MSG_MROE_COMMANDS_PROMPT = "\nCommands to try:\n"

MSG_MORE_COMMANDS = [
{
"name": "az config\n",
"desc": "Display your config summary.\n",
},
{
"name": "az config list available\n",
"desc": "Show all options that you can configure.\n"
},
{
"name": "az config set <group> <key>=<value>\n",
"desc": "Set a config.\n",
},
{
"name": "az interactive",
"desc": "Start an interactive mode designed to help you learn.\n",
},
{
"name": "az next\n",
"desc": "Find the next set of commands.\n",
},
{
"name": "az <sub command> --help\n",
"desc": "Display help related to a command or subcommand.\n",
}
]
6 changes: 5 additions & 1 deletion src/init/azext_init/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from ._text import (MSG_WELCOME, MSG_SELECT_STEP, MSG_INPUT_SELECTION, MSG_PROMPT_MANAGE_GLOBAL, MSG_NO_CONFIGURATION,
MSG_CURRENT_SETTINGS, MSG_PROMPT_GLOBAL_OUTPUT, MSG_PROMPT_TELEMETRY, MSG_PROMPT_FILE_LOGGING,
MSG_PROMPT_CACHE_TTL, INIT_STEP_OPTION_LIST, MSG_CUSTOM_SETTING_APPLIED, MSG_MORE_CONFIG_SETTINGS,
MSG_MORE_CONFIG_LINK, CONTENT_INDENT_BROADBAND)
MSG_MORE_CONFIG_LINK, CONTENT_INDENT_BROADBAND, MSG_MROE_COMMANDS_PROMPT, MSG_MORE_COMMANDS)
from ._utils import prompt_option_list, get_int_option, print_successful_styled_text


Expand Down Expand Up @@ -170,4 +170,8 @@ def handle_interactive_mode(cmd, config_list):

print_styled_text([(Style.PRIMARY, CONTENT_INDENT_BROADBAND + MSG_MORE_CONFIG_SETTINGS),
(Style.HYPERLINK, MSG_MORE_CONFIG_LINK)])
print_styled_text((Style.PRIMARY, CONTENT_INDENT_BROADBAND + MSG_MROE_COMMANDS_PROMPT))
for msg in MSG_MORE_COMMANDS:
print_styled_text([(Style.PRIMARY, CONTENT_INDENT_BROADBAND + msg['name']),
(Style.SECONDARY, CONTENT_INDENT_BROADBAND + msg['desc'])])
print()

0 comments on commit 834ab6e

Please sign in to comment.