question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Suggestion : Change default value

See original GitHub issue

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)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
lzybkrcommented, Sep 30, 2020

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

2reactions
SeeminglySciencecommented, Sep 30, 2020

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 <kbd>Tab</kbd> 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 <kbd>Ctrl</kbd> + <kbd>Space</kbd> to see the rest
  3. <kbd>Tab</kbd> or arrow keys (ideally also <kbd>Ctrl</kbd> + <kbd>p/n</kbd>) to move between items
  4. <kbd>Enter</kbd> accepts input like outside of menu. Accepting completion result done with <kbd>Space</kbd> (while still adding a space like it does currently)
  5. <kbd>Esc</kbd> 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding a default value for the suggestions in typeahead
I wanted to add a default value (All) in the dropdown list of typeahead apart from the suggested value that comes up in...
Read more >
Is it possible to change the default mode from "suggestion ...
Each time I open a text submitted by a student, it opens in suggestion mode. It is tiresome to change it for each...
Read more >
Default value
Hi all! How can I put a default value in an editable text field in an already created record? That is, a suggested...
Read more >
Access Tutorial - Setting the default value - YouTube
LinkedIn Learning is the next generation of Lynda.com. Grow your skills by exploring more Access courses today: ...
Read more >
Setting an attribute to a default value for new objects only
I have a multi-valued attribute with no current default. Some objects are set to non-default values; some have the default (blank). I want...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found