Skip to content

Suggestion : Change default value #1839

Closed

Description

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)

Activity

  1. ghost added
    Needs-Triage 🔍It's a new issue that core contributor team needs to triage.
    on Sep 28, 2020
  2. lzybkr commented on Sep 28, 2020

    @lzybkr
    Contributor

    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.

  3. EArminjon commented on Sep 30, 2020

    @EArminjon
    Author

    The Emacs config in powershell broke tab menu complete :), i didn't use it

  4. SeeminglyScience commented on Sep 30, 2020

    @SeeminglyScience
    Collaborator

    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>).

  5. lzybkr commented on Sep 30, 2020

    @lzybkr
    Contributor

    Patrick Meinecke (@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.

  6. SeeminglyScience commented on Sep 30, 2020

    @SeeminglyScience
    Collaborator

    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:

    1. Menu always shown on Tab unless there's a single or no result
    2. Don't prompt on high result counts, instead only show the first "page" of results. Maybe with a message suggesting Ctrl + Space to see the rest
    3. Tab or arrow keys (ideally also Ctrl + p/n) to move between items
    4. Enter accepts input like outside of menu. Accepting completion result done with Space (while still adding a space like it does currently)
    5. Esc to clear completion result/menu (like it does currently)

    That would fit the existing muscle memory folks have built up while still providing a significant UX boost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions