-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix share completion with provider and spaces #19440
base: master
Are you sure you want to change the base?
Conversation
src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs
Outdated
Show resolved
Hide resolved
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs
Outdated
Show resolved
Hide resolved
@@ -1269,6 +1269,11 @@ class InheritedClassTest : System.Attribute | |||
$res.CompletionMatches[0].CompletionText | Should -BeExactly $afterTab | |||
} | |||
|
|||
It "Tab completion UNC path with filesystem provider" -Skip:(!$IsWindows) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since your regex explicit avoids device paths, should have a test for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't test it because the wildcard globbing was broken (see: #19442 ) but now that it has been fixed, I'll add the test.
-Edit: Nope, still broken. Not sure how to add a test for it until the rest of the code supports tab completion of device paths.
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
The @PowerShell/wg-powershell-engine discussed this and believe this change to be proper from a behavioral perspective. |
PR Summary
Stops the regex pattern for fileshares from (incorrectly) finding Windows device paths.
Makes the list item/tooltip text for fileshare completions consistent with normal path completion behavior.
Fixes tab completion for share names when specifying the filesystem provider like this:
Microsoft.PowerShell.Core\FileSystem::\\localhost\<Tab>
previously you would get no results.Also fixes tab completion for file shares which are currently not quoted as they should when they contain spaces.
I have a question about adding a test share for this scenario. Can I just do it? Do I need to do anything special with the share ACL?
PR Context
Fixes #7569
Fixes #10002
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).