Skip to main content

Interactively select an entry from your bash/zsh history.

Project description

selecta - Interactively search and select entries from your bash/zsh history.

This is a Python3 clone of François Fleuret’s excellent selector tool.



$ selecta --bash -y <(history)


CTRL+i: toggle case sensitivity

CTRL+r: toggle REGEX search


$ sudo pip3 install selecta

Install the keyboard shortcut ALT+r:

$ selecta_install_bash

This will append the following line to your ~/.bashrc:

bind '"\C-[r":"\C-a\C-k selecta --bash -y <(history)\C-m"'

–help output

usage: selecta [-h] [-i] [-b] [-z] [-e] [-a] [-d] [-y] [--bash] [--zsh]

positional arguments:
  infile                the file which lines you want to select eg. <(history)

optional arguments:
  -h, --help            show this help message and exit
  -i, --revert-order    revert the order of the lines
  -b, --remove-bash-prefix
                        remove the numeric prefix from bash history
  -z, --remove-zsh-prefix
                        remove the time prefix from zsh history
  -e, --regexp          start in regexp mode
  -a, --case-sensitive  start in case-sensitive mode
  -d, --remove-duplicates
                        remove duplicated lines
  -y, --show-hits       highlight the part of each line which match the
                        substrings or regexp
  --bash                standard for bash history search, same as -b -i -d
  --zsh                 standard for zsh history search, same as -b -i -d


  • Add the cd feature from selector.
  • Implement missing command line switches.
  • Add missing keyboard shortcuts

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for selecta, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size selecta-0.1.1.tar.gz (6.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page