On Linux, tab completion doesn't show files whose names differ from others by case only
See original GitHub issueNote: The problem seems to be in the match-cycling logic, because TabExpansion2
is working properly.
Steps to reproduce
On Linux:
# Switch to a temp dir.
Push-Location (New-Item -Type Directory -Force "temp:/$PID")
# Create two files whose names differ only in case.
$null = New-Item foo.txt, FOO.txt
# Note that the following test SUCCEEDS.
# That is, the TabExpansion2 function correctly finds both names.
(TabExpansion2 './').CompletionMatches.CompletionText | Should -Be './foo.txt', './FOO.txt'
# However, INTERACTIVE CYCLING is broken.
# Type "./" and press TAB to cycle through the matches.
# Currently only *1* name is found.
Code for later cleanup:
Pop-Location; Remove-Item -Recurse "temp:/$PID"
Expected behavior
Tab-completion should cycle through ./foo.txt
and /FOO.txt
.
Actual behavior
Only one name is found, ./foo.txt
Environment data
PowerShell Core 7.2.0-preview.1
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Case-insensitive completion in bash
Tab completion is a feature of your shell (default is bash on most Linuxes, zsh on up-to-date Macs). But unix-style file and directory...
Read more >bash - Tab completion only exists for ls but not for other ...
Type ls s* , and press tab twice will then list the candidate files. Type rm s , and press tab once will...
Read more >file name auto completion works for ls but not for vi
It auto-completes to some degree, but when I don't give the start pattern at a directory entrance, it gives me no list of...
Read more >Bash Auto-completion with Tab button doesn't ...
In my Kubuntu there is no /usr/share/bash-completion/completions/vim file, but the file /usr/share/bash-completion/bash_completion.
Read more >Command-line completion
Command -line completion (also tab completion) is a common feature of command-line interpreters, in which the program automatically fills in partially typed ...
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
@dkaszews Neat. I just tested it on my Windows 11 PC and it works without issues if you unload the PSReadline module so if there was any doubt before that the issue was caused by PSReadline then that doubt should be cleared now.
Will see if changing the line found by @MartinGC94 to check if system is case insensitive (Windows) or case sensitive (mostly everything else) resolves the issue without breaking any tests.