Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add support for `undo` #1367

Open
creack opened this Issue Mar 26, 2014 · 8 comments

Comments

Projects
None yet
10 participants

creack commented Mar 26, 2014

It would be nice to have an undo feature.

I don't know about bash, but zsh and emacs use <ctrl + _> for this and it is very very useful.

@ridiculousfish ridiculousfish added this to the fish-future milestone Mar 26, 2014

@zanchey zanchey added the vi-mode label Apr 9, 2015

Granjow commented Nov 4, 2015

FYI: Bash supports undo with Ctrl+_

Granjow commented Nov 4, 2015

Just for clarification, it is not undoing a command (like, undo rm -f *), but undoing an edit command like delete word (Alt+d) or kill to EOL (Ctrl+k)?

@zanchey zanchey added enhancement and removed vi-mode labels Nov 8, 2015

Sorry, is still this feature unimplemented?

Member

faho commented Feb 13, 2017

Yes.

kek commented Apr 13, 2017

I didn't know about the use case for undo in a command line, because if I would delete something by mistake with Ctrl-K, Ctrl-W or Ctrl-U, I would just use Ctrl-Y to paste it back. It seems to work in fish too. Could that be considered a workaround?

Contributor

adambyrtek commented Apr 16, 2017

I don't think it's just about line editing commands. I often use undo (in zsh) for cancelling the last Tab expansion that for some reason went too far (for example due to a typo).

Contributor

Ambrevar commented Jun 5, 2017

From http://fishshell.com/docs/current/index.html#editor:

u undoes the most recent action.

I guess that was a little too anticipated then... :p

Contributor

krader1961 commented Jun 5, 2017

I guess that was a little too anticipated then.

Yes, that dates back to when vi mode was implemented with commit f68f91b on 2014-11-08. Obviously it was a bit of wishful thinking. I've removed that line from the docs. At the moment it is bound to history-search-backward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment