Psreadline: Feature request: autocomplete executables without extension

Created on 2 Oct 2019  路  1Comment  路  Source: PowerShell/PSReadLine

Could you add an option to autocomplete names of executables without an extension like for example bash is doing, please?

That means if I have an executable program.exe and I autocomplete its name, PSReadline inserts just program without the extension.

Question-Answered

Most helpful comment

Completions are actually handled by PowerShell, PSReadLine only presents a system to display them in a menu format.

Technically in a Windows environment, the completion would need to include the extension, to be 'complete'. Bash comes from an environment where there typically is no extensions (at least for executable files of any kind), but without a extension on a Windows system, the item would still be considered ambiguous. For instances, for VS Code, there is both a code.cmd and a code.exe, though only code.cmd is exposed by the PATH.

>All comments

Completions are actually handled by PowerShell, PSReadLine only presents a system to display them in a menu format.

Technically in a Windows environment, the completion would need to include the extension, to be 'complete'. Bash comes from an environment where there typically is no extensions (at least for executable files of any kind), but without a extension on a Windows system, the item would still be considered ambiguous. For instances, for VS Code, there is both a code.cmd and a code.exe, though only code.cmd is exposed by the PATH.

Was this page helpful?
0 / 5 - 0 ratings