Redo typing in OSX bash

In bash on OSX I can do ctrl-_ to undo what I most recently typed. Is there a corresponding redo command?


Solution 1:

ctrl-y is the Readline 'yank' command which retrieves the kill buffer. ctrl-u kills from the point to the beginning of the line (similar to OSX/bash ctrl-_ which clears the whole line). The Emacs-like Readline bindings are enabled in bash and a subset are enabled in many other places (browser search bars etc).

  • ctrl-u kill from start of line to insertion point
  • ctrl-k kill from insertion point to end of line
  • ctrl-w kill previous word (and prepend to kill buffer)
  • ctrl-y yank contents of kill buffer