-
Notifications
You must be signed in to change notification settings - Fork 319
Description
I have a test case where I can reproduce the issue. Unfortunately, It happens to be a directory full of code that I don't, yet, have rights to release. I have not been able to isolate the exact scenario that causes the issue, thus I have not been able to reproduce this issue in a controlled circumstance.
The parent path of the folder that I'm currently experiencing problems with resides under C:\Program Files\WindowsPowerShell\Modules\
.
Update: I've come up with a full test case. It appears that it's related to a hidden dotfile in the directory with a large ammount of the name matching another file. This commonly happens with Vim, as it creates ".swp" files in this way as it's working on a file.
Steps to reproduce:
-
Create a file structure to recreate the problem:
- Make the parent directory:
cd ~ New-Item -Type Directory -Path tmp\PSReadLine_260 cd tmp\PSReadLine_260
- Create some test files in the directory.
New-Item -Type File -Path testFileOne.txt New-Item -Type File -Path testFileTwo.txt New-Item -Type File -Path testFileThree.txt
- Create the file that will break tab completion (note the dot at the beginning).
New-Item -Type File -Path .testFileOne.txt attrib +H .testFileOne.txt
-
Enter
gc t
-
Press the Tab key
Expected behavior:
The resultant command line should read:
> gc .\testFile
Actual behavior:
The resultant command line reads:
> gc .\
Typing enough of the file name will cause completion to function properly.
gc testFi<Tab>
will result in:
gc .\
gc testFil<Tab>
will result in:
gc .\testFile
Without knowing the codebase, this makes me wonder if there's a Compare-Object occurring with a SyncWindow size that's too small.