Skip to content

tmux-contrib/tmux-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tmux-url

Extract and open URLs from your tmux pane with a beautiful interactive picker powered by gum.

Test Release License: MIT

Dependencies

  • tmux (version 1.8+)
  • gum - Terminal UI toolkit
  • xurls - URL extractor

Installation

Add this plugin to your ~/.tmux.conf:

set -g @plugin 'tmux-contrib/tmux-url'

And install it by running <prefix> + I.

Usage

Key Binding Action
Prefix + u Open URL picker for current pane

Workflow:

  1. Press Prefix + u (default: Ctrl+b then u)
  2. Select a URL from the interactive list using arrow keys
  3. Press Enter to open in your default browser
  4. Press Esc to cancel

Configuration

Add these options to your ~/.tmux.conf before loading the plugin:

# Custom key binding (default: u)
set -g @url-key 'o'

# URL detection mode (default: strict)
set -g @url-detection-mode strict   # Only URLs with explicit schemes
set -g @url-detection-mode relaxed  # Include bare domains

# Buffer scan depth (default: 10000)
set -g @url-buffer-lines 5000

Options

Option Default Description
@url-key "u" Key binding for URL picker
@url-detection-mode "strict" URL detection mode (strict or relaxed)
@url-buffer-lines "10000" Lines to scan from pane history

Detection Modes

Strict mode (default):

  • Detects: https://github.com, ftp://example.com, mailto:user@example.com
  • Does NOT detect: github.com, user@example.com (without scheme)

Relaxed mode:

  • Detects all URLs from strict mode PLUS bare domains like github.com

Development

Prerequisites

Install dependencies using Nix:

nix develop

Or install manually: bash, tmux, bats

Running Tests

bats tests/

Debugging

Enable trace output with the DEBUG environment variable:

DEBUG=1 /path/to/tmux-url/scripts/tmux_url.sh

License

MIT

About

Extract and open URLs from your tmux pane with a beautiful interactive picker

Topics

Resources

License

Stars

Watchers

Forks

Contributors