Skip to content

Commit 6a8e32e

Browse files
authored
don't add \ if path already starts with that on pwsh for suggestions (microsoft#251219)
fix microsoft#25127
1 parent d1d6762 commit 6a8e32e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/vs/workbench/contrib/terminalContrib/suggest/browser/terminalCompletionService.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,9 @@ function getFriendlyPath(uri: URI, pathSeparator: string, kind: TerminalCompleti
525525
*/
526526
function addPathRelativePrefix(text: string, resourceRequestConfig: Pick<TerminalResourceRequestConfig, 'pathSeparator'>, lastWordFolderHasDotPrefix: boolean): string {
527527
if (!lastWordFolderHasDotPrefix) {
528+
if (text.startsWith(resourceRequestConfig.pathSeparator)) {
529+
return `.${text}`;
530+
}
528531
return `.${resourceRequestConfig.pathSeparator}${text}`;
529532
}
530533
return text;

0 commit comments

Comments
 (0)