Skip to content

Avoiding expansion with incremental history search #540

Description

@taviso

I was trying out hstr and noticed the recommended way to use it is with bind '"\C-r": "\C-a hstr -- \C-j"'. That works okay, but if you have anything in backticks or any other substitution it will get immediately executed on Ctrl+R, which is probably unexpected...

I guess you could do bind '"\C-r": "\e# history -d -1;hstr -- !!:s^#^^:x\C-j"'

The # should prevent expansion, and then make bash quote it for you...?

I don't know, just a suggestion 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions