Skip to main content
Quick Select mode allows you to rapidly identify and copy text that matches common patterns without using your mouse. It’s perfect for quickly grabbing URLs, file paths, git commit hashes, IP addresses, and other frequently-copied patterns.

Activating Quick Select

ActionKeybinding
Activate quick selectCtrl+Shift+Space
When activated, WezTerm searches the visible terminal content for matching patterns and highlights them with one or two character labels.

How It Works

1

Activate quick select mode

Press Ctrl+Shift+Space to scan the terminal for patterns.
2

View highlighted matches

Matching text is highlighted with letter/number prefixes (like a, b, aa, etc.).
3

Type the prefix to copy

Type the prefix in lowercase to copy the match to clipboard and exit.
4

Or type uppercase to paste

Type the prefix in UPPERCASE to copy AND paste the match immediately.

Default Patterns

Quick select automatically matches:
  • URLs: http, https, and other web addresses
  • File paths: Absolute and relative filesystem paths
  • Git hashes: SHA commit hashes (6+ hex characters)
  • IP addresses: IPv4 addresses
  • Numbers: Numeric values
  • UUIDs: Standard UUID format

Custom Patterns

Add your own patterns to match domain-specific text:

Quick Select Configuration

Custom Patterns
local wezterm = require 'wezterm'
local config = {}

-- Add custom patterns to match
config.quick_select_patterns = {
  -- Match JIRA tickets
  '[A-Z]+-\\d+',
  -- Match hex colors
  '#[0-9a-fA-F]{6}',
  -- Match semantic versions
  '\\d+\\.\\d+\\.\\d+',
}

return config

More Pattern Examples

config.quick_select_patterns = {
  -- GitHub issue references
  '#\\d+',
  -- Docker container IDs (short)
  '\\b[0-9a-f]{12}\\b',
  -- AWS resource IDs
  '\\b[a-z]+-[0-9a-f]{17}\\b',
  -- Base64 encoded strings
  '\\b[A-Za-z0-9+/]{20,}={0,2}\\b',
}

Customizing the Alphabet

Change which characters are used for labels:
Custom Alphabet
local wezterm = require 'wezterm'
local config = {}

-- Use only letters (no numbers)
config.quick_select_alphabet = 'abcdefghijklmnopqrstuvwxyz'

-- Or use Dvorak home row
config.quick_select_alphabet = 'aoeuhtns'

-- Or numbers first
config.quick_select_alphabet = '1234567890'

return config
The default alphabet is optimized for touch typing: asdfqwerzxcvjklmiuopghtybn1234567890

Visual Customization

Customize how matches are highlighted:
Highlight Colors
local wezterm = require 'wezterm'
local config = {}

config.colors = {
  quick_select_label_bg = { Color = '#ffff00' },
  quick_select_label_fg = { Color = '#000000' },
  quick_select_match_bg = { Color = '#ff00ff' },
  quick_select_match_fg = { Color = '#ffffff' },
}

return config

Remove Styling

For cleaner visual focus, remove color and styling from the pane:
Clean Display
config.quick_select_remove_styling = true
This strips all colors and formatting before highlighting matches, making them easier to spot in busy terminal output.

Advanced Usage

Opening URLs

Quick URL Opening
-- 1. Run a command that outputs URLs
-- 2. Press Ctrl+Shift+Space
-- 3. Type the label for the URL
-- 4. The URL is copied to clipboard
-- 5. Paste it or use a browser extension to open from clipboard

Copying Multiple Matches

Sequential Copying
-- 1. Activate quick select
-- 2. Type lowercase label to copy first match
-- 3. Immediately press Ctrl+Shift+Space again
-- 4. Copy next match
-- 5. Repeat as needed

Selecting and Pasting

Use uppercase labels for instant paste:
Copy and Paste
-- Example: Copying a git hash to use in a command
-- 1. Run: git log --oneline
-- 2. Press Ctrl+Shift+Space
-- 3. Type UPPERCASE label (e.g., 'A' instead of 'a')
-- 4. The hash is copied AND pasted at cursor

Exiting Quick Select

ActionKeybinding
Cancel without copyingEscape
Select and copyType label (lowercase)
Select, copy, and pasteType label (UPPERCASE)

Use Cases

Development Workflow

# View commits
git log --oneline

# Press Ctrl+Shift+Space
# Type label for desired commit hash
# Hash is now in clipboard

# Use it immediately
git checkout <paste>

System Administration

Container Management
# List containers
docker ps

# Quick select container ID
# Ctrl+Shift+Space -> type label

# Inspect container
docker inspect <paste>

Network Operations

IP Addresses
# Show network connections
netstat -an

# Quick select an IP address
# Ctrl+Shift+Space -> type label

# Ping it
ping <paste>

Pattern Syntax

Quick select patterns use regular expression syntax:
PatternDescriptionExample
\\dDigit\\d+ matches 123
\\wWord character\\w+ matches hello
[A-Z]Character class[A-Z]+ matches ABC
{n,m}Repetition\\d{2,4} matches 42 or 2024
\\bWord boundary\\b\\d{4}\\b matches year 2024
+One or morea+ matches a or aaa
*Zero or moreab* matches a or abb
?Optionalcolou?r matches color or colour
Remember to escape backslashes in Lua strings: use \\\\ for a literal backslash in the regex.

Performance Considerations

  • Quick select only scans visible terminal content
  • Complex patterns may take longer to match
  • Large terminal windows have more content to scan
  • Consider using simpler patterns for better performance

Comparison: Quick Select vs Copy Mode

FeatureQuick SelectCopy Mode
SpeedVery fastSlower, more precise
Use caseCommon patternsArbitrary text
Mouse neededNoNo
Pattern matchingAutomaticManual navigation
Multi-lineNoYes
RectangularNoYes
Use Quick Select when:
  • Copying URLs, hashes, IDs, or other patterns
  • Speed is important
  • Pattern is visible on screen
Use Copy Mode when:
  • Selecting arbitrary text
  • Needing multi-line selection
  • Pattern is not pre-defined
  • Wanting Vim-style navigation

Tips and Tricks

  1. Combine with scrollback: Scroll to make the desired text visible, then activate quick select
  2. Use uppercase for workflows: Uppercase paste is perfect for shell command construction
  3. Refine patterns over time: Add patterns you frequently need to your config
  4. Test patterns: Use regex testing tools to validate patterns before adding them
  5. Keep alphabet short: Fewer characters mean shorter labels and faster selection