Skip to content

Ctrl+R behavior when no matches: cancelled command #9934

Closed

Description

@jerrygreen

In normal bash, when no results found while using reverse-i-search (Ctrl+R), you still able to run the command you started to type.

In fish, if search fails, pressing enter just cancels the search.

I think fish should stick to bash behavior in here, – actually execute command on pressing Enter.

After all, if user wants to cancel his command, he can always press Ctrl+C.

There's no need to duplicate this behavior for Enter, basically removing other useful functionality.

Activity

  1. krobelus commented on Aug 6, 2023

    @krobelus
    Contributor

    makes sense, good find

  2. added this to the fish-future milestone on Aug 7, 2023
  3. josharsh commented on Aug 8, 2023

    @josharsh

    Hey
    Is this issue still open and up for grabs?
    May I pick it?

    @zanchey @faho @uggedal @krobelus @jerrygreen

  4. faho commented on Aug 8, 2023

    @faho
    Member

    Is this issue still open and up for grabs?

    As far as I know, yeah.

    May I pick it?

    Go right ahead!


    However, @josharsh: Please don't tag random people in your comment.

  5. krobelus commented on Aug 8, 2023

    @krobelus
    Contributor

    I don't think it should execute directly but only copy the search field text to the commandline, to be consistent with successful matches

  6. jerrygreen commented on Aug 8, 2023

    @jerrygreen
    Author

    I don't think it should execute directly but only copy the search field text to the commandline, to be consistent with successful matches

    100% true. I didn't mean to execute it right away. You're completely right in this one. Consistency is important

    UPD. on the second thought though, it might be a good thing to change this double-enter Ctrl+R behavior in overall, that's a bit off the current issue so I created discussion there:

    May I pick it?

    ❤

  7. modified the milestones: fish next-3.x, fish 3.7.0 on Oct 9, 2023
  8. added a commit that references this issue on Oct 17, 2023
    211a3ce
  9. added a commit that references this issue on Feb 6, 2024
    b7f7dcf
  10. locked as resolved and limited conversation to collaborators on Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions