Skip to content
tmux clipboard copy and output completions
Python Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
scripts fix #31, use ctrl-g instead of ctrl-l for grab area Dec 3, 2019
LICENSE Initial commit Sep 20, 2017

extrakto for tmux


Output completions - you can complete commands that require you to retype text that is already on the screen. This works everywhere, even in remote ssh sessions.

You can fuzzy find your text instead of selecting it by hand:

  • press tmux prefix + tab to start extrakto
  • fuzzy find the text/path/url/line
  • press
    • tab to insert it to the current pane,
    • enter to copy it to the clipboard,
    • ctrl-o to open the path/url or
    • ctrl-e to edit with $EDITOR

Use it for paths, URLs, options from a man page, git hashes, docker container names, ...


Requires tmux, fzf and Python 2/3. Supports Linux (xclip), macOS (pbcopy) and Bash on Windows clipboards.

with Tmux Plugin Manager

Add the plugin to the list of TPM plugins in .tmux.conf:

set -g @plugin 'laktak/extrakto'

Hit prefix + I to fetch the plugin and source it.

You should now have all extrakto key bindings defined.

Manual Installation

Clone the repo:

$ git clone ~/clone/path

Add this line to the bottom of .tmux.conf:

run-shell ~/clone/path/extrakto.tmux

Reload the tmux environment:

# type this in terminal
$ tmux source-file ~/.tmux.conf

You should now have all extrakto key bindings defined.


To set any of these options write on your ~/.tmux.conf file:

set -g <option> "<value>"

Where <option> and <value> are one of the specified here:

Option Default Description
@extrakto_key tab The key binding to start. If you have any special requirements (like a custom key table) set this to '' and define a binding in your .tmux.conf. See extrakto.tmux for a sample.
@extrakto_default_opt word The default extract options (word, lines or path/url)
@extrakto_split_direction v Whether the tmux split will be vertical or horizontal
@extrakto_split_size 7 The size of the tmux split
@extrakto_grab_area full Whether you want extrakto to grab data from the recent area, the full pane, all current window's recent areas or all current window's full panes. You can also set this option to any number you want (or number preceded by "window ", e.g. "window 500"), this allows you to grab a smaller amount of data from the pane(s) than the pane's limit. For instance, you may have a really big limit for tmux history but using the same limit may end up on having slow performance on Extrakto.
@extrakto_clip_tool auto Set this to whatever clipboard tool you would like extrakto to use to copy data into your clipboard. auto will try to choose the correct clipboard for your platform.
@extrakto_fzf_tool fzf Set this to path of fzf if it can't be found in your PATH.
@extrakto_open_tool auto Set this to path of your own tool or auto to use your platforms open implementation.


set -g @extrakto_split_size "15"
set -g @extrakto_clip_tool "xsel --input --clipboard" # works better for nvim


You can also use extrakto as a standalone tool to extract tokens from text.


For now simply clone the repository and link to the tool somewhere in your path:

git clone
cd extrakto
# assuming you `export PATH=$PATH:~/.local/bin` in your `.bashrc`:
ln -s $PWD/ ~/.local/bin/extrakto

Requires Python 2/3.

CLI Usage

usage: [-h] [-p] [-u] [-w] [-l] [-r] [-m MIN_LENGTH]

Extracts tokens from plaintext.

optional arguments:
  -h, --help            show this help message and exit
  -p, --paths           extract path tokens
  -u, --urls            extract url tokens
  -w, --words           extract word tokens
  -l, --lines           extract lines
  -r, --reverse         reverse output
  -m MIN_LENGTH, --min-length MIN_LENGTH
                        minimum token length


Special thanks go to @ivanalejandro0 and @maximbaz for their ideas and PRs!

You can’t perform that action at this time.