Skip to content

Allow combining multiple commands from history #9751

@a-m-s

Description

@a-m-s

I frequently find myself reusing sequences of commands over and over, with maybe only minor edits. In bash I'd probably use the Ctrl-O feature to rapidly repeat history, but that's not a fish thing. Instead I either do "up-up-up-enter", repeatedly, or I get all my commands and stick them together with &&.

$ a
$ b
$ c
$ a && b && c

It would be nice if fish had some way to assist me with this. Right now I can use "up" to select the first command, but then I have to cut and paste with the mouse to join the others.

Perhaps something like a && <shift-up> would allow me to add a command from history to the end of the line? This would be a bit like alt-up, but for whole commands.

The same trick would be handy for ;, &, ||, and, or, not, etc. (maybe pipe?) Perhaps it could just work without any context?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions