From be994886f5efee4e53d2ba9d1fda3da3f9a3c522 Mon Sep 17 00:00:00 2001 From: MartinGC94 Date: Tue, 25 Mar 2025 15:24:11 +0100 Subject: [PATCH] Add completers for the Property parameter for Compare-Object and ConvertTo-Html --- .../CommandCompletion/CompletionCompleters.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs b/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs index e9a28c2a165..d321c7281ec 100644 --- a/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs +++ b/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs @@ -2452,6 +2452,16 @@ private static void NativeCommandArgumentCompletion( break; } + case "ConvertTo-Html": + { + if (parameterName.Equals("Property", StringComparison.OrdinalIgnoreCase)) + { + NativeCompletionMemberName(context, result, commandAst, boundArguments?[parameterName]); + } + + break; + } + case "New-Object": { if (parameterName.Equals("TypeName", StringComparison.OrdinalIgnoreCase)) @@ -8230,7 +8240,10 @@ internal static List CompleteHashtableKey(CompletionContext co case "Sort-Object": return GetSpecialHashTableKeyMembers(excludedKeys, wordToComplete, "Expression", "Ascending", "Descending"); case "Group-Object": + case "Compare-Object": return GetSpecialHashTableKeyMembers(excludedKeys, wordToComplete, "Expression"); + case "ConvertTo-Html": + return GetSpecialHashTableKeyMembers(excludedKeys, wordToComplete, "Expression", "Label", "Width", "Alignment"); case "Format-Table": return GetSpecialHashTableKeyMembers(excludedKeys, wordToComplete, "Expression", "FormatString", "Label", "Width", "Alignment"); case "Format-List":