Hi,
I spent always long minutes to setup powershell for people and i didn't understand why the following options aren't the default one :
Powershell profile example:
Import-Module PSReadLine
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward
Set-PSReadLineOption -predictionsource history (It requiert "PSReadLine 2.1.0-beta2")
Set-PSReadLineOption -HistorySearchCursorMovesToEnd
(I'm sad to see that predictionsource is just in beta, because it's a primary feature for me)
(i hope it's going soon in release)
I agree the history defaults should change. I suggest opening a PR.
I don't think we have enough feedback to make inline predictions the default but I suspect it would bother a lot of people.
The default Emacs/Vi Tab experience is vastly superior to the default Windows experience and MenuComplete
is different enough that a change would be bothersome to those used to this bash-like experience. I'd only be open to changing the default Windows experience.
The Emacs config in powershell broke tab menu complete :), i didn't use it
MenuComplete
may be divisive as a default for Tab on Windows as well due to the extra key press to accept and prompt on many results (e.g. Get<tab>
).
@SeeminglyScience - I said I'm open to it because I think many folks just aren't aware that there is a better experience available.
If there is a single completion, then the menu isn't used. Maybe there is a nice compromise where the menu would only be used if there were greater than N
completions, say 5 - where tabbing is too tedious. The default binding would work this way, but custom bindings wouldn't change.
I said I'm open to it because I think many folks just aren't aware that there is a better experience available.
Yeah I definitely agree, it comes up in every PSRL reddit thread followed by many astounded replies.
Here's what I'd personally love to see as a default:
That would fit the existing muscle memory folks have built up while still providing a significant UX boost.
Most helpful comment
@SeeminglyScience - I said I'm open to it because I think many folks just aren't aware that there is a better experience available.
If there is a single completion, then the menu isn't used. Maybe there is a nice compromise where the menu would only be used if there were greater than
N
completions, say 5 - where tabbing is too tedious. The default binding would work this way, but custom bindings wouldn't change.