基于PSReadLine 得智能提示, tab健下拉菜单
下载依赖
Install-Module -Name GuiCompletion
注册tab按键
Install-GuiCompletion -Key Tab
或者自定义按键
Set-PSReadlineKeyHandler -Key Alt+Spacebar -ScriptBlock { Invoke-GuiCompletion }
更改$profile
里的$GuiCompletionConfig
调整弹窗样式
$GuiCompletionConfig
Colors : @{TextColor=DarkMagenta;
BackColor=White;
SelectedTextColor=White;
SelectedBackColor=DarkMagenta;
BorderTextColor=DarkMagenta;
BorderBackColor=White;
BorderColor=DarkMagenta;
FilterColor=DarkMagenta}
DoubleBorder : True
MinimumTextWidth : 25
FastScrollItemCount : 10
AutoReturnSingle : True
ScrollDisplayDown : False
DotComplete : True
AutoExpandOnDot : True
BackSlashComplete : True
AutoExpandOnBackSlash : True
CustomComplete : True
CustomCompletionChars : ()[]:
自带psreadline的menu设置
Set-PSReadLineKeyHandler -Key "Ctrl+d" -Function MenuComplete