This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a tmux plugin that provides a floating fzf interface for quick window switching with intelligent prefix matching and visual indicators. The plugin consists of:
tmux_quick_switch.tmux- Main plugin entry point that configures key bindingsscripts/quick-switch.sh- Core functionality implementing the fzf popup interface
The plugin follows a two-stage execution model:
- Initial tmux command execution checks for fzf and spawns a popup
- Popup execution (
$1 == "popup") runs the fzf interface with window selection logic
Key functions in scripts/quick-switch.sh:
get_window_list_with_colored_prefixes()- Calculates minimum unique prefixes and applies ANSI coloring (lines 15-77)show_fzf_popup()- Main fzf interface with optional auto-jump functionality (lines 79-139)
The plugin reads tmux options:
@quick_switch_key- Custom key binding (default: "prefix" for prefix-prefix)@quick_switch_auto_jump_exact- Enable auto-jump for exact prefix matches (default: "off")
- fzf must be installed and available in PATH
- tmux version 3.2+ for popup support
No automated test suite is present. Manual testing involves:
- Installing the plugin in a tmux session
- Creating multiple windows with different names
- Testing the key binding to open the switcher
- Verifying prefix highlighting and auto-jump functionality
- ANSI escape sequences are used for coloring:
\033[1;91m(light red, bold) and\033[0m(reset) - The plugin handles ANSI code stripping for text matching operations
- Window mapping uses format: "window_name (active):window_index"