DEV Community

Lawrence Lagerlof
Lawrence Lagerlof

Posted on • Edited on

crtlr.sh - CTRL+r on steroids

This project is available on GitHub at http://github.com/llagerlof/ctrlr

Usage

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).

Installation

  • Install fzf
  • Install xclip or xsel
  • Copy the ctrlr.sh file to /usr/local/bin/
  • Make it executable:
chmod +x /usr/local/bin/ctrlr.sh
Enter fullscreen mode Exit fullscreen mode
  • Override the vanilla CTRL+r adding the following line to the end of your ~/.bashrc:
bind -x '"\C-r": "source /usr/local/bin/ctrlr.sh"'
Enter fullscreen mode Exit fullscreen mode
  • Restart the terminal

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more