Commit a23e30b 1 parent 563892f commit a23e30b Copy full SHA for a23e30b
File tree 2 files changed +23
-1
lines changed
src/System.Management.Automation/engine/CommandCompletion
test/powershell/Host/TabCompletion
2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -4869,7 +4869,7 @@ private static List<CompletionResult> GetDefaultProviderResults(
4869
4869
4870
4870
if ( childNameList . Count == 0 )
4871
4871
{
4872
- return results ;
4872
+ continue ;
4873
4873
}
4874
4874
4875
4875
string basePath = providerPrefix . Length > 0
Original file line number Diff line number Diff line change @@ -43,6 +43,28 @@ Describe "Tab completion bug fix" -Tags "CI" {
43
43
$result [0 ].CompletionText | Should - BeExactly ' $ErrorActionPreference'
44
44
}
45
45
46
+ It " Issue#24756 - Wildcard completions should not return early due to missing results in one container" - Skip:(! $IsWindows ) {
47
+ try
48
+ {
49
+ $keys = New-Item - Path @ (
50
+ ' HKCU:\AB1'
51
+ ' HKCU:\AB2'
52
+ ' HKCU:\AB2\Test'
53
+ )
54
+
55
+ $res = TabExpansion2 - inputScript ' Get-ChildItem -Path HKCU:\AB?\'
56
+ $res.CompletionMatches.Count | Should - Be 1
57
+ $res.CompletionMatches [0 ].CompletionText | Should - BeExactly " HKCU:\AB2\Test"
58
+ }
59
+ finally
60
+ {
61
+ if ($keys )
62
+ {
63
+ Remove-Item - Path HKCU:\AB? - Recurse - ErrorAction SilentlyContinue
64
+ }
65
+ }
66
+ }
67
+
46
68
Context " Issue#3416 - 'Select-Object'" {
47
69
BeforeAll {
48
70
$DatetimeProperties = @ ((Get-Date ).psobject.baseobject.psobject.properties) | Sort-Object - Property Name
You can’t perform that action at this time.
0 commit comments