-
Notifications
You must be signed in to change notification settings - Fork 318
Closed
Labels
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues, especially the pinned issues.
Exception report
N/AScreenshot
N/A
Environment data
PS Version: 7.3.0-preview.7
PS HostName: ConsoleHost
PSReadLine Version: 2.2.6
PSReadLine EditMode: Vi
OS: Linux Cuddles-Berry 5.15.0-1015-raspi #17-Ubuntu SMP PREEMPT Mon Sep 12 13:14:51 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
BufferWidth: 208
BufferHeight: 55Steps to reproduce
Promoted from PowerShell/PowerShell#14365
Non-Windows filesystems are case-sensitive, and there has been an option fsutil.exe file queryCaseSensitiveInfo $path enable to make Windows also case sensitive on per-folder basis (useful for interop, e.g. WSL or checking out repositories with mixed-case files). PSReadLine suggestion deduplication logic uses HashSet<string>(StringComparer.OrdinalIgnoreCase) which is then a problem when you have files differing only in case.
Repro steps:
$tempdir = "tmp:/$(Get-Random)"
New-Item $tempdir Directory
if ($PSVersionTable.OS -match 'Windows') { fsutil.exe file queryCaseSensitiveInfo $tempdir enable }
New-Item 'TEST', 'test'
# input: ./t<TAB><TAB>Expected behavior
Suggestions cycle between ./test and ./TEST
Actual behavior
Suggestion shows only one option, usually ./TEST because it was created earlier, but may by environment
mklement0