Skip to content

feat(tmux): rework prefix-wait and command-prompt statusline#25

Merged
ronload merged 2 commits into
mainfrom
feat/tmux-prompt-statusline
Jul 2, 2026
Merged

feat(tmux): rework prefix-wait and command-prompt statusline#25
ronload merged 2 commits into
mainfrom
feat/tmux-prompt-statusline

Conversation

@ronload

@ronload ronload commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Why

Two overlapping issues in the statusline's "command" presentation:

  1. The prefix-wait state (client_prefix) reused the yellow COMMAND
    tag, which collides with the actual command-prompt. They are different
    things: prefix-wait is a leader key waiting for the next press, not
    command input.
  2. Every interactive prompt (move-window, rename, find-window,
    choose-tree filter, copy-mode search) and message was drawn from
    column 0, covering the mode block, instead of continuing the
    statusline like the prefix state does.

What

  • Relabel prefix-wait as PREFIX in orange #ff966c (unused by any
    other mode), freeing COMMAND / yellow for the real command-prompt.
  • Prepend the COMMAND + session block via message-format so every
    prompt continues after the session block, with its native prompt text
    ((move-window), (filter), ...) following it. This is the only lever
    that reaches the built-in filter/search prompts, which cannot take a
    -p label.
  • Simplify the ; binding to plain command-prompt; the block now
    comes from message-format globally and would otherwise be doubled.

Trade-offs

  • message-format has no per-prompt-type format variable, so all prompts
    share the fixed COMMAND label; the native prompt text distinguishes
    them.
  • Passive messages (errors, display-message) also carry the
    COMMAND + session prefix.

ronload added 2 commits July 2, 2026 14:20
The client_prefix state reused the COMMAND label and yellow hue, which
collided with the actual command-prompt. Relabel it PREFIX and recolor it
orange (#ff966c, unused by other modes) so the leader-wait state reads as
distinct from real command input.
Every prompt (move-window, rename, find-window, choose-tree filter,
copy-mode search) and message was drawn from column 0, covering the mode
block. Prepend the COMMAND + session block via message-format so a prompt
continues after the session block with its native prompt text following,
mirroring the prefix look. This is the only lever that reaches the
built-in filter/search prompts, which cannot take a -p label.

The ; binding no longer bakes the block into its own -p, since
message-format now provides it globally and would otherwise double it.
@ronload ronload self-assigned this Jul 2, 2026
@ronload ronload added the enhancement New feature or request label Jul 2, 2026
@ronload ronload merged commit 63a617a into main Jul 2, 2026
7 checks passed
@ronload ronload deleted the feat/tmux-prompt-statusline branch July 2, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant