I used to use zsh, but I've got some cross-platform scripts written in pwsh
. As a macOS user, I use homebrew
constantly. The thing bothers me most is that homebrew
official doesn't provide pwsh
autocompletion. How can I get one?
Asked
Active
Viewed 343 times
0

Wongboo
- 124
- 1
- 6
1 Answers
-1
Comes bundled with powershell 7. You need to import PSReadline in your powershell profile, then map a key to autocomplete. Latest versions of PS also have history and plugin based intellisense (with only one plugin for the latter), which also has to be enabled in your profile.
-
PSReadlines' predictive intellisense WILL autocomplete assuming you've typed it out manually at least once, and gone through the steps to activate it. https://devblogs.microsoft.com/powershell/announcing-psreadline-2-1-with-predictive-intellisense/ – King Wombat Mar 26 '21 at 14:17
-
In this case, homebrew autocompletion in PSReadline is astonishing terrible comparing to zsh. Looks like you never really try these thing! – Wongboo Mar 27 '21 at 03:24
-
Never said it was good, but it's what there is for powershell. If you want to downgrade to using base windows powershell, then there's powertab. – King Wombat Mar 27 '21 at 06:56