mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
This commit is contained in:
1 parent
7cc9c87473
commit
4acf6b39d4
2 files changed
+15
-4
No files matched your search
@@ -4301,7 +4301,8 @@ namespace System.Management.Automation
|
||||
var results = new List<CompletionResult>();
|
||||
|
||||
// First, try to match \\server\share
|
||||
var shareMatch = Regex.Match(wordToComplete, "^\\\\\\\\([^\\\\]+)\\\\([^\\\\]*)$");
|
||||
// support both / and \ when entering UNC paths for typing convenience (#17111)
|
||||
var shareMatch = Regex.Match(wordToComplete, @"^(?:\\\\|//)([^\\/]+)(?:\\|/)([^\\/]*)$");
|
||||
if (shareMatch.Success)
|
||||
{
|
||||
// Only match share names, no filenames.
|
||||
|
||||
Reference in new issue
Block a user