UNC Path autocompletion removes one leading slash, preventing further completions
See original GitHub issueSystem Details
VS Code 1.36 PowerShell Extension: Preview 2019.05 PowerShell 6.2 or 7.0 preview 2
System Details Output
### VSCode version: 1.36.1 2213894ea0415ee8c85c5eea0d0ff81ecc191529 x64
### VSCode extensions:
docsmsft.docs-markdown@0.2.12
donjayamanne.githistory@0.4.6
eamodio.gitlens@9.9.2
GitHub.vscode-pull-request-github@0.9.1
keroc.hex-fmt@1.0.0
ms-mssql.mssql@1.6.0
ms-vscode.csharp@1.21.0
ms-vscode.powershell@2019.5.0
ms-vscode.powershell-preview@2019.5.0
ms-vscode.Theme-TomorrowKit@0.1.4
ms-vscode.vscode-typescript-tslint-plugin@1.2.2
vscode.theme-monokai-less-dimmed@0.0.1
Serhioromano.vscode-st@9.9.9
### PSES version: 2.0.0.0
### PowerShell version:
Name Value
---- -----
PSVersion 7.0.0-preview.2
PSEdition Core
GitCommitId 7.0.0-preview.2
OS Microsoft Windows 10.0.18362
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Issue Description
Attempting to complete a path to a directory on a UNC path, the leading slash keeps being removed by the completion.
'\\server\share\somefolder\'
Expected Behaviour
'\\server\share\somefolder\AdditionalFolder\'
Actual Behaviour
'\server\share\somefolder\AdditionalFolder\'
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (5 by maintainers)
Top Results From Across the Web
UNC Path autocompletion removes one leading slash, preventing ...
UNC Path autocompletion removes one leading slash, preventing further ... directory on a UNC path, the leading slash keeps being removed by the...
Read more >How do I make zsh autocompletion remove trailing slash it ...
The only issue with my zsh autocomplete is that it leaves the tailing directory slash after the autocomplete.
Read more >20 Completion System - zsh
The option -n prevents any completions already defined for the command or context from being overwritten. The option -d deletes any completion defined...
Read more >How to use Cmd's tab autocomplete effectively? - Super User
The way Bash's autocomplete works is that the tab key expands only if there is a unique expansion. Otherwise, nothing happens, but you...
Read more >How can I keep the trailing slash after choosing a directory ...
For many commands, retaining the trailing slash makes no difference for directories, but causes the command to act on the target directory ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have a fix for this out now https://github.com/PowerShell/PowerShellEditorServices/pull/1044
Everything works fine at the prompt, I have been working on the completions code myself, but I can confirm that everything works fine from the integrated terminal, both PS 6.2.2 and PS 7 preview.
Inside VS Code, the path completion seems to be working differently. The leading slash is being removed, and it would appear, relative to the command prompt, the trailing slash is being removed too.
IMPORTANT, the path must be quoted, or the selection made must make it quote the path during the completion, to see this.
After completing
"\\server\share\"
via intergrated terminal prompt:"\\server\share\folder\"
After completing
"\\server\share\"
in VS Code in a PS1 file:"\server\share\folder"