Skip to content
Inverse of shell command, find file first and act accordingly on it. A fast file finder with curses interface.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Mr T


What is it.

MrT is a curses based file finder. If you're familiar with Textmate's cmd-t, Vim's Command-T plugin, or Emacs' Anything, you'll feel right at home.

MrT allows you to have fast, file completion from your shell prompt. You can use it as-is by invoking the mrt command, or use it as your default file completion strategy for some unix commands.


MrT requires ruby version 1.8.7 or greater, it has been tested with 1.9.2. It requires your ruby to have been compiled with the standard curses and readline libraries. If you are building your own ruby or are using rvm make sure you have needed development libraries before compiling ruby.

We use the Command-T gem, we expect our changes can be integrated into Command-T's main repo.


rake install

You might want to add the pity alias to your ~/.bashrc to easilly kill a fool process.

alias pity="ps -eopid,cmd | mrt - 3>&1 1>&2 2>&3 | awk '{print\$1}' | xargs kill"


After installation, you might be able to use the mrt binary, right now it takes an optional directory as only argument.

MrT not only allows you to find files, if you hit the TAB key upon a selected file, MrT will present a set of actions to execute on it.

Even though MrT was created for fast file finding from the shell prompt, it is not restricted to work only on files. Actually, because of MrT's addon design you can easily configure it to complete on anything you want.

As with vim, you can use the backslash key (we call it Leader) to change from one selector to another using Leader + someKey. Use Leader + space to show available selectors.


A YAML file ~/.mrtrc with a Hash content can be used for configuration.

Default values are:

# used to determine which files should be excluded from listings.
# this is a list of glob patterns.
ignore_patterns: []

# if true and no directory is specified, mrT tries to guess git project root.
find_git_root: true

# max depth of directories to find files in.
max_depth: 15

# max number of matches to display.
max_files: 10_000

# if you're inside a Git repo, should Mr T use your ignore patterns?
# by default Mr T will only use gitignore
patterns_in_git_repo: false

# should hidden directories be scanned?
scan_dot_directories: false

# should hidden files be shown?
show_dot_files: false

# if you're inside a Git repo, should Mr T ignore the same files as Git?
use_git_ignore: true


If a .mrtrc.rb file is found at your $HOME directory it will be automatically loaded. On a git repo you can place it at the root dir.


Use Command-T caching features, expose Command-T options as command line flags.


Feel free to adapt mrT to your needs, report any issue or send pull requests to the github repository:


Something went wrong with that request. Please try again.