我可以让PowerShell标签完整显示所有选项,而不是选择一个特定的选项吗?

mik*_*ana 8 powershell tab-completion

在Powershell中,如果我键入:

install-<tab>
Run Code Online (Sandbox Code Playgroud)

Powershell选项卡完成将以一个以.开头的单个命令完成 install-

Install-Package
Run Code Online (Sandbox Code Playgroud)

我可以Tab再次看到不同的完成情况.

是否有可能让Powershell显示所有以我输入的内容开头的选项,比如Linux或Unix shell?例如,如果我输入:

install-<tab>
Run Code Online (Sandbox Code Playgroud)

我明白了:

Install-Package
Install-PackageProvider
Install-Script
Run Code Online (Sandbox Code Playgroud)

Mat*_*sen 23

PSReadLine有一个这样的功能称为MenuComplete.而不是Tab,按Ctrl+ space:

EmacsModeTabCompletionWithPSReadLine

您可以将MenuComplete功能绑定到选项卡Set-PSReadLineKeyHandler:

Set-PSReadlineKeyHandler -Chord Tab -Function MenuComplete
Run Code Online (Sandbox Code Playgroud)