Usage Guide

tmux-thumbs operates in two modes: as a Tmux plugin (interactive overlay) or as a standalone CLI tool (piped input).

Tmux Integration

Basic Trigger

By default, the trigger key is Space.

  1. Press <prefix> + Space.
  2. tmux-thumbs will analyze the visible pane content.
  3. Hints (e.g., a, b, da) will appear over matched items (IPs, paths, hashes).
  4. Type the hint characters to copy the highlighted text.

Keybindings

  • Esc: Cancel/Exit thumbs mode.
  • Space: Toggle Multi-Selection mode.
  • Arrow Keys: Navigate hints (if necessary).

Multi-Selection

To copy multiple items at once:

  1. Trigger thumbs (<prefix> + Space).
  2. Press Space to enter multi-mode.
  3. Type the hints for all items you want to collect. They will change color to indicate selection.
  4. Press Space again (or Enter) to finalize the copy operation.

Standalone Usage

The core logic is decoupled from Tmux. You can use the thumbs binary directly in your shell to pick items from stdin.

Basic Piping

# Pick a commit hash from git log
git log | thumbs

Examples

Copy to system clipboard (Linux/macOS with tools):

# Using an alias for convenience
alias pick='thumbs -u -r | xsel --clipboard -i'

# List files and pick one to clipboard
ls -l | pick

Multi-select output:

# -m enables multi-selection
git log | thumbs -m

CLI Arguments

When running standalone, you can pass arguments directly:

  • -m, --multi: Enable multi-selection.
  • -r, --reverse: Reverse priority order of hints.
  • -u, --unique: Assign one hint per unique string (deduplication).
  • -c, --contrast: Put brackets [] around hints.
  • -t, --target <path>: Write selected text to a file instead of stdout.