A tmux plugin that provides emacs-style word completion with cycling functionality, similar to Alt+/ in emacs.
- Word completion: Complete partial words by searching through all panes
- Cycling: Press the completion key multiple times to cycle through matches
- Scrollback support: Option to search through entire scrollback history
- Path component extraction: Handles both full paths and individual components
- Fuzzy selection (fzf): Pick a completion from an fzf popup instead of cycling
-
Clone this repository:
git clone https://github.com/machacd/tmux-complete ~/.tmux/plugins/tmux-complete -
Add this line to your
~/.tmux.conf:run-shell ~/.tmux/plugins/tmux-complete/tmux-completion.tmux -
Reload tmux configuration:
tmux source-file ~/.tmux.conf
prefix + /- Complete word using visible pane contentprefix + ?- Complete word using entire scrollback history (larger word pool)prefix + F- Open an fzf popup to fuzzy-select a word from visible panes
- Type a partial word (e.g.,
test) - Press the completion key (e.g.,
prefix + /) - The word completes to the first match (e.g.,
testing_function) - Press the completion key again to cycle to the next match (e.g.,
test_variable) - Continue cycling through all available matches
You can customize the key bindings by setting these options in your ~/.tmux.conf:
# Change the basic completion key (default: "/")
set -g @completion_key "/"
# Change the scrollback completion key (default: "?")
set -g @completion_scrollback_key "?"
# Change the fzf popup key (default: "F")
set -g @completion_fzf_key "F"The plugin searches for words that:
- Contain alphanumeric characters, underscores, dots, slashes, hyphens, and equals signs
- Are at least 2 characters long
- Start with your typed partial word
It extracts both:
- Full paths:
/home/user/file.txt - Components:
home,user,file,txt
- Visible content: Fast, searches only currently visible pane content
- Scrollback content: Slower but comprehensive, searches entire history
- tmux 2.0+
- bash
- Standard Unix utilities (grep, sed, awk)
- fzf and tmux 3.2+ — only for the
prefix + Ffuzzy popup
MIT License - see LICENSE file for details.
- Show word search time in the status bar
- Sort words in cycle by order of appearance
