Documentation

What is tmux-autocomplete?

tmux-autocomplete is an addon for tmux that allows to interactively complete various strings from current output (pane) using string under cursor as prefix.

tmux-autocomplete can be also used as url-opener since it can match arbitrary strings in output and run specified command, for example, browser.

Power of tmux-autocomplete comes from the fact that it is working on top of tmux, which means that it can complete strings for any program running in terminal, including remote ssh sessions.

Why should I use tmux-autocomplete?

tmux-autocomplete significantly reduces need of use mouse when working in terminal by providing an easy way of inserting parts of outputs of previous commands back.

If you ever selected text in your terminal with mouse just for inserting it back for next command in shell, then tmux-autocomplete is for you.

What are requirements?

The only requirement for using tmux-autocomplete is tmux itself.

I am not a tmux user. Can I use tmux-autocomplete?

Yes, but you must install tmux, then you need to add simple tmux configuration in your ~/.tmux.conf file (create if doesn't exist):

set -g prefix C-Space
bind-key C-Space run -b 'tmux-autocomplete'

After that you can download and install tmux-autocomplete.

Then open new terminal and run tmux then you can type some string, invoke completion by pressing Control+Space twice in a row. Tmux-autocomplete will be spawned and will find completion for inserted prefix automatically.

How to install tmux-autocomplete?

Once you downloaded the package for your OS, you need to install it using your system package manager.

MacOS

sudo installer -pkg tmux-autocomplete_2.0.6.gba9f4dd.pkg -target / -verbose

Or just double click on the downloaded file using File Manager.

Ubuntu/Debian

With dpkg: sudo dpkg -i tmux-autocomplete_2.0.5.gc0658bf.deb

Arch Linux

sudo pacman -U tmux-autocomplete_2.0.5.gc0658bf.pkg.tar.xz

Fedora/CentOS

With rpm: sudo rpm -i tmux-autocomplete_2.0.5.gc0658bf.rpm

How to complete identifier?

tmux-autocomplete invoked by using key combination that should specified in your ~/.tmux.conf, like this: set -g prefix C-Space
bind-key C-Space run -b 'tmux-autocomplete'

If you have configuration like this, you can invoke completion of string under cursor in your terminal by hitting Control+Space twice in a row.

How to select completion candidate?

After tmux-autocomplete invoked and given that string under cursor can be completed by more than one string in scrollback, text in terminal go gray and available completion candidates will be higlighted.

Press h / Arrow Left , j / Arrow Down , k / Arrow Up , l / Arrow Right to select candidate.

Press Enter to insert selected candidate.

How to exit completion mode?

Press Control+C to interrupt current completion and go back without modifying text in your terminal.

How to change theme?

tmux-autocomplete uses dark theme as default theme. You can switch to light theme by changing binding in your ~/.tmux.conf: bind-key C-Space run -b 'tmux-autocomplete --theme=light'

Using tmux-autocomplete as URL opener

Add new binding in your ~/.tmux.conf, like this: bind-key C-x run -b 'tmux-autocomplete-url'

Source configuration using tmux source ~/.tmux.conf .

Now you can select and open URL from output of terminal by pressing Control-X .

How to create custom theme?

Check out following file in your system for some inspiration: /usr/share/tmux-autocomplete/themes/light.theme

What is price of tmux-autocomplete?

Although tmux-autocomplete is not open-source and require license file, it is free now for early adopters. If it will gain some traction, then it will be made paid to support following development and new features.

Please, write to we@reconquest.io to receive free license.

What to do if tmux-autocomplete is not working?

If something will go wrong, tmux-autcomplete will print debug messages back to terminal. If you will encounter such situation, please copy output and contact support for additional help.

My terminal is not supported by tmux-autocomplete, what can I do?

Ping us, we will add support.

It does not work on tmux v3

It works, make sure that you are passing flag -b to run command in your tmux.conf, like as following: bind-key C-Space run -b 'tmux-autocomplete'