Menu

#95 Preselect the first matching history line?

open
nobody
2015-02-24
2014-08-12
Anonymous
No

Originally created by: Heart1010
Originally owned by: dvorka

Hi,

wouldn't it be so much easier/better when hstr would preselect the first line/occurence of the searched string? Example: I search for pull and get all the search results shown correctly in hstr but I always have to use the cursor down key to select the first search result.

Can you select the the first search result (instead of now the gray "- HISTORY - view:ranking..." line?

Thanks

1 Attachments

Related

Tickets: #102

Discussion

  • Anonymous

    Anonymous - 2014-12-20

    Ticket changed by: dvorka

    • status: open --> closed
     
  • Anonymous

    Anonymous - 2015-01-09

    Originally posted by: Heart1010

    This should be in v1.15, shouldn't it?

    So I start with "hh" to bring hstr to my shell (blank search), then I type "teamv" and as you can see the first occurence is not selected. Am I doing something wrong!?

     
  • Anonymous

    Anonymous - 2015-01-09

    Originally posted by: tbabej

    If you press ENTER, the first line will get executed. It's true it's not highlighted, but it's debatable if it should be.

     
  • Anonymous

    Anonymous - 2015-01-09

    Ticket changed by: dvorka

    • status: closed --> open
     
  • Anonymous

    Anonymous - 2015-01-09

    Originally posted by: Heart1010

    @tbabej Ah ok... got it.

    (highlighting the line would be "a nice to have" visible thing imho... the implementation now is not intuitive, I never had pressed enter in this stage/highlighting when you haven't told me that g)

     
  • Anonymous

    Anonymous - 2015-01-09

    Originally posted by: dvorka

    I think that you are right Hermann - once you start typing, the first row will be highlighted to indicate that this is what will be used on ENTER or ctrl-right (nothing will be highlighted only if prompt is empty).

     
  • Anonymous

    Anonymous - 2015-02-24

    Originally posted by: dvorka

    Actually I just determined that there is inconsistent behavior (needs to be fixed):
    ENTER - execute the first line
    LEFT - open the first line in editor for customization (fix command)
    * RIGHT - take what's in the prompt (not the first line!) and show it on command line (not executed), BUT it should show the first line for editation i.e. this is a defect.

    Proposed solution/fixes:
    the first line to be highlighted all the time
    RIGHT shows the first line (not what's in the prompt)
    * LEFT (fix command) shows the first line when filter pattern (prompt) is empty

    Conclusion: filter pattern is not something to be executed, rather it is just a token to filter, therefore it makes no sense to pass it to command line + the first highlighted line indicates what is actually going to happen on ENTER/LEFT/RIGHT.

     

Log in to post a comment.