Skip to main content

Overview

WezTerm provides powerful search capabilities for finding text in your terminal output and scrollback history. You can search using plain text, case-sensitive matching, or regular expressions. Open the search overlay with an optional pre-filled pattern:
Pattern
required
The search pattern to use. Can be one of:
  • 'CurrentSelectionOrEmptyString' - Use selected text or empty (default)
  • { CaseSensitiveString = 'text' } - Exact case-sensitive match
  • { CaseInSensitiveString = 'text' } - Case-insensitive match
  • { Regex = 'pattern' } - Regular expression pattern

Search Pattern Types

CurrentSelectionOrEmptyString

Use the currently selected text as the search term:
If there’s no selection, the search overlay opens empty, ready for input.

CaseSensitiveString

Search for an exact string match:
This will only match “ERROR” exactly, not “error” or “Error”.

CaseInSensitiveString

Search for a string ignoring case:
This will match “warning”, “WARNING”, “Warning”, etc.

Regex

Search using regular expressions:
WezTerm uses Rust’s regex syntax. View the full syntax documentation
When in copy mode, you can use search-specific navigation actions:

Copy Mode Search Actions

CopyModeAssignment
Open or edit the search pattern
CopyModeAssignment
Jump to the next match
CopyModeAssignment
Jump to the previous match
CopyModeAssignment
Jump forward by a page of matches
CopyModeAssignment
Jump backward by a page of matches
CopyModeAssignment
Toggle between case-sensitive, case-insensitive, and regex matching
CopyModeAssignment
Clear the current search pattern
CopyModeAssignment
Accept the current pattern and close the search input

ActivateCopyMode

Enter copy mode, which provides keyboard-driven navigation and search:
Copy mode allows you to:
  • Navigate with keyboard (vim-style bindings)
  • Search and navigate results
  • Select and copy text without using the mouse

Complete Example

Search Overlay Controls

When the search overlay is active:
  • Enter - Navigate to next match
  • Shift+Enter - Navigate to previous match
  • Ctrl+R - Cycle match type (case-sensitive → case-insensitive → regex)
  • Ctrl+U - Clear the search input
  • Escape - Close search overlay
  • Up/Down arrows - Navigate match history

Regular Expression Examples

Common regex patterns for searching:
Use the CycleMatchType action (Ctrl+R) in the search overlay to quickly switch between case-sensitive, case-insensitive, and regex matching without retyping your pattern