Skip to content

michelboaventura/tmux-hints

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tmux-hints

A fast Zig utility that scans your tmux pane for URLs and file paths, displays them with keyboard hints, and lets you quickly open or paste selections.

Features

  • Scans tmux pane content for URLs (http://, https://) and file paths (/, ~/)
  • Displays matches in a popup with single-key hints (home-row keys first for ergonomics)
  • Opens URLs in your default browser
  • Pastes file paths directly into your pane
  • Deduplicates matches automatically
  • Supports up to 26 matches per scan

Requirements

  • Zig 0.15 or later
  • tmux

Installation

git clone https://github.com/michelboaventura/tmux-hints.git
cd tmux-hints
zig build -Doptimize=ReleaseFast

The binary will be at zig-out/bin/tmux_hints.

Usage

Run inside a tmux session:

tmux_hints

A popup will appear showing all detected URLs and paths with hint characters. Press the corresponding key to:

  • URLs: Open in your default browser
  • Paths: Paste the path into the current pane

Press q or Esc to cancel.

Recommended tmux binding

Add to your ~/.tmux.conf:

bind-key f run-shell "/path/to/tmux_hints"

Then press prefix + f to invoke tmux-hints.

Building

zig build              # Build (output: zig-out/bin/tmux_hints)
zig build run          # Build and run
zig build test         # Run tests

How it works

  1. Captures the last 100 lines from your current tmux pane
  2. Scans for URLs and file paths using pattern matching
  3. Assigns hint characters (a-z, home-row first)
  4. Shows a tmux popup with the matches
  5. On selection, opens URLs with your system opener or pastes paths to the pane

License

MIT

About

Extracting URL/paths from a tmux pane with vimium like shortcuts

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages