diff --git a/src/interactive/HISTORY.rst b/src/interactive/HISTORY.rst index 9d79b249753..61c6ad834ca 100644 --- a/src/interactive/HISTORY.rst +++ b/src/interactive/HISTORY.rst @@ -3,10 +3,11 @@ Release History =============== -upcoming +0.5.2 +++++ -* Fix Scenario Idx out of bound when selecting recommended scenario * Add command skipped message in Scenario Execution Mode +* Fix Scenario Idx out of bound when selecting recommended scenario +* Fix `KeyError` when entering param not in sample in scenario mode 0.5.1 +++++ diff --git a/src/interactive/azext_interactive/azclishell/__init__.py b/src/interactive/azext_interactive/azclishell/__init__.py index 9bf03ff7bca..484c399852c 100644 --- a/src/interactive/azext_interactive/azclishell/__init__.py +++ b/src/interactive/azext_interactive/azclishell/__init__.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -VERSION = '0.5.1' +VERSION = '0.5.2' diff --git a/src/interactive/azext_interactive/azclishell/scenario_suggest.py b/src/interactive/azext_interactive/azclishell/scenario_suggest.py index 74edf623c54..79a954d58e7 100644 --- a/src/interactive/azext_interactive/azclishell/scenario_suggest.py +++ b/src/interactive/azext_interactive/azclishell/scenario_suggest.py @@ -4,6 +4,7 @@ # -------------------------------------------------------------------------------------------- import re +from collections import defaultdict from prompt_toolkit.auto_suggest import AutoSuggest, Suggestion @@ -31,7 +32,7 @@ def update(self, sample: str): # The sample should not start with 'az ' self.cur_sample = sample.split('az ')[-1] # Find parameters used in sample and its value - self.param_sample_value_map = {} + self.param_sample_value_map = defaultdict(lambda: None) # Find the command part of sample self.cur_command = self.cur_sample.split('-')[0].strip() cur_param = ''