Home

Awesome

redo

bash/zsh interactive history menu / autocompletion replacement for bash/zsh <kbd>Ctl</kbd>+<kbd>R</kbd> and <kbd>Esc</kbd>+<kbd>/</kbd> to search in history and re-execute/re-edit commands.

usage

$ git clone https://github.com/joknarf/redo
$ source redo/redo

or direct source from github repository:

$ source <(curl -Ls https://raw.githubusercontent.com/joknarf/redo/main/redo)

Then on command line:

redo

keys in menu

keyaction
<kbd></kbd>select next item
<kbd></kbd>select prev item
<kbd>End</kbd>/<kbd></kbd>select last item
<kbd>Home</kbd>/<kbd></kbd>select first item
<kbd>PgUp</kbd>/<kbd>Ctl-F</kbd>next page
<kbd>PgDn</kbd>/<kbd>Ctl-B</kbd>previous page
<kbd>Esc</kbd>exit
<kbd>Ctrl</kbd>+<kbd>A</kbd>use all screen to display menu
<kbd>Enter</kbd>/<kbd>Tab</kbd>put selected on command line
<kbd>Tab</kbd>apply filter/new filter
<kbd>Del</kbd>/<kbd>F8</kbd>delete item from history file

delete history commands

To delete command from current shell history and $HISTFILE use redodel command then chose command and press <kbd>Del</kbd> or <kbd>F8</kbd>.

Using <kbd>Del</kbd>/<kbd>F8</kbd> when using redo bind key (<kbd>Esc</kbd>+<kbd>/</kbd> or <kbd>Ctl</kbd>+<kbd>R</kbd>) will not remove command from current shell history (line editing limitation), but the $HISTFILE will be purged from the command.

When deleting history in $HISTFILE using redo bind key, set the following options to ensure the history is not written later in $HISTFILE by shell.

limitations