Skip to content

Commit f65d6fa

Browse files
committed
typecompletion bash script for az and updated as per codereview comments
1 parent d5c35d8 commit f65d6fa

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1+
***Welcome to the azure management commands***
12

2-
this is poor "az --help"
3-
4-
help me build my content !!!!!!!!!!!!!
3+
Run 'azure help' to get a list of all commands.

src/CLU/Microsoft.CLU/CommandModel/CmdletCommandModel.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,14 @@ public CommandModelErrorCode Run(ConfigurationDictionary commandConfiguration, s
9797
catch (CommandNotFoundException)
9898
{
9999
var helplines = binderAndCommand.ListCommands(binderAndCommand.Discriminators.ToArray(), isComplete);
100+
string strNoCommand = string.Format(Strings.CmdletHelp_Generate_NoCommandAvailable,
101+
CLUEnvironment.ScriptName, String.Join(" ", binderAndCommand.Discriminators.ToArray()));
100102
foreach (var entry in helplines)
101103
{
102-
CLUEnvironment.Console.WriteLine(entry);
104+
if (!String.Equals(strNoCommand, entry))
105+
{
106+
System.Console.WriteLine(entry);
107+
}
103108
}
104109
return CommandModelErrorCode.CommandNotFound;
105110
}

src/CLU/Microsoft.CLU.Run/script/azcomplete.sh renamed to src/CLU/Microsoft.CLU/script/azcomplete.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
_azcomp2()
22
{
33
export params=$(printf "%s " "${COMP_WORDS[@]:1}")
4-
COMPREPLY=( $(./az ${params} --complete 2>&1 ) )
4+
COMPREPLY=( $(${1} ${params} --complete) )
55
return 0
66
}
77

0 commit comments

Comments
 (0)