3 ms·
Do you use pwsh as your daily driver? I find that its commands are as easily memorable as any other shell. That being said You should enable these: Set-PS
by vips7L 4y ago
Do you use pwsh as your daily driver? I find that its commands are as easily memorable as any other shell.
That being said You should enable these:
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
Set-PSReadLineOption -PredictionSource History
MenuComplete will give you a menu of arguments that each command takes so you can easily see them when pressing tab for completions and prediction source will try to predict the commands you want based on your history.
- juki 4y agoAlso make sure you're on latest version of PSReadLine (I had some problems with it not updating properly and had to do a manual `Install-Module PSReadLine -Force`) and try Set-PSReadLineOption -PredictionSource HistoryAndPlugin -PredictionViewStyle ListView You can also toggle between the default inline and listview with F2. Also if you install Install-Module CompletionPredictor and add this to your profile: Import-Module -Name CompletionPredictor Set-PSReadLineOption -PredictionSource HistoryAndPlugin -PredictionViewStyle ListView you also get the normal intellisense autocompletions in the listview. And remember that if you have all the help files installed locally you can use F1 to view help for the current parameter/command.
- vips7L 4y agoThanks! I haven't seen CompletionPredictor before. I'll give it a shot.
- deafpolygon 4y ago/mind blown/ very nice.
- papascrubs 4y agoBeen using the latest PSReadline but CompletionPredictor is awesome and exactly what I've been looking for. One other PowerShell protip Ctrl+Space is also another great shortcut for completing commands, it lets you see what type a parameter is expecting etc. $ Get-ChildItem -<ctrl+space> Path Depth File ErrorAction <snip> [string[]] Path