Merge pull request #227069 from microsoft/tyriar/222237_2

Add missing escape
pull/199021/merge
Daniel Imms 2024-08-29 05:56:12 -07:00 committed by GitHub
commit c2bd93fd92
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -389,7 +389,7 @@ function Send-Completions {
# Add `../ relative to the top completion
$firstCompletion = $completions.CompletionMatches[0]
if ($firstCompletion.CompletionText.StartsWith("..$([System.IO.Path]::DirectorySeparatorChar)")) {
if ($completionPrefix -match "(\.\.$([System.IO.Path]::DirectorySeparatorChar))+") {
if ($completionPrefix -match "(\.\.\$([System.IO.Path]::DirectorySeparatorChar))+") {
$parentDir = "$($matches[0])..$([System.IO.Path]::DirectorySeparatorChar)"
$currentPath = Split-Path -Parent $firstCompletion.ToolTip
try {