question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tab completion regression in ordering (does not match Linux shells, Windows explorer, or cmd)

See original GitHub issue

Steps to reproduce

mkdir test
cd test

echo "" > foo.exe
echo "" > foo_bar.cmd
echo "" > foo_bar_zar.cmd
mkdir foo

.\f <tab> <tab> <tab> <tab> ...

Expected behavior

Expected tab completion order as follows -- matches pwsh 7.0.x, windows explorer, cmd, AND linux Bash
.\foo\  .\foo.exe  .\foo_bar.cmd  .\foo_bar_zar.cmd

Actual behavior

Regression in ordering
.\foo\  .\foo_bar_zar.cmd  .\foo_bar.cmd  .\foo.exe

Do the right thing and fix the regression.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
theJasonHelmickcommented, Aug 2, 2023

Thank you for the issue – The WG reviewed this issue and believes it is a change to .NET (as stated by @mklement0) https://github.com/PowerShell/PowerShell/blob/7b3e5444de9b1740677ed70c42fac03556855bc1/src/System.Management.Automation/namespaces/FileSystemProvider.cs#L1633 As noted, it is not a goal of PowerShell to be consistent with other shells or file managers.

1reaction
jessey-gitcommented, Aug 3, 2023

For anyone in the future coming across this utter nonsense for file listing and tab completion, there’s a workaround available in: https://github.com/PowerShell/PowerShell/issues/19736

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make Windows tab completion work like on Linux?
In the Windows 7 command line, pressing TAB completes to the first matching item (ie, folder or file). In most Linux shells I...
Read more >
VSCode's shell command `code` no longer working in ...
I think this issue was caused to me by an update of VSCode, which happened automatically. To solve it: open VSCode in Windows....
Read more >
[Solved] Tab Completion Not Working in Ubuntu & Debian
Tab completion not working for you in the terminal? Here's the easy way to fix it in Ubuntu/Debian based distributions.
Read more >
Tab autocompletion in bash vi shell mode
When using MSYS on a windows platform, I "set -o vi" to use the vi shell mode. Tab autocompletion for files and directories...
Read more >
Release notes & updates – Azure CLI
Learn about the latest Azure Command-Line Interface (CLI) release notes and updates for both the current and beta versions of the CLI.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found