News for hackers. Stuff that matters.
Re:s/bash/zsh/g by NobodyNada on Wednesday October 20, 2021 @12:22PM (#28932572)
I switched to Fish a couple years ago, and I love it too — the only thing I ever find myself missing from bash is `!!`. The (new) Alt+S keybind to prepend `sudo` to a command covers many of these use cases, but not all of them. For example, sometimes I want to re-run the last two commands; in Bash I could do `<up><up> && !!` but there doesn’t seem to be a good way to do this in Fish without having to re-type one of the commands.

Alt+Up is great for recalling individual arguments, but am I missing something or is there no way to recall a whole previous line in-place, without overwriting what’s currently on the command line?

Re:s/bash/zsh/g by cookiecaper on Wednesday October 20, 2021 @01:03PM (#28933100)
Up-up-Ctrl+K to kill the line; down to go down one in the history; end to go to end of line; `; and` or ` &&` to join the commands; ctrl+Y to yank the line from the killring. [0]

Seems to work in bash too, fwiw.

[0] https://fishshell.com/docs/current/interactive.html#copy-and...

Re:s/bash/zsh/g by artful-hacker on Wednesday October 20, 2021 @04:21PM (#28935942)
The first thing in install with oh-my-fish is bang-bang, which fixes this issue for me.

https://github.com/oh-my-fish/plugin-bang-bang