Skip to content

On Linux, tab completion doesn't show files whose names differ from others by case only #14365

@mklement0

Description

@mklement0

Note: 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-ExternalThe issue is caused by external component(s).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions