This project is available on GitHub at http://github.com/llagerlof/ctrlr
Once the script is installed, use the
CTRL+r shortcut in the terminal as you normally would to find past commands. You can use the arrow keys or you can type to search. Find the command you want to execute and press ENTER. The selected command will be inserted into the prompt (but not executed). If you want to execute it you should press ENTER again.
Beyond that the selected command will be copied to the clipboard, ready to be pasted anywhere (try
CTRL+SHIFT+V in another application).
- Copy the
- Make it executable:
chmod +x /usr/local/bin/ctrlr.sh
- Override the vanilla
CTRL+radding the following line to the end of your
bind -x '"\C-r": "source /usr/local/bin/ctrlr.sh"'
- Restart the terminal