Skip to content

feat(zsh): transient prompt support #42

Description

@lemtoc

As of v0.3.0 (c73dc6c).

Summary

Transient prompt — collapsing previous prompts to a minimal one-liner (typically just the prompt character) after a command is accepted — is the most-requested comfort feature in the pure/powerlevel10k family and fits Nova's philosophy directly: scrollback stays dense, and the full two-line prompt only occupies the active line.

Nova's architecture makes this cheap: the zsh adapter already owns PROMPT/RPROMPT and has a zle integration point; no worker round trip is needed for the collapsed form.

Proposed design

  • Config: a [transient] table (or layout.transient) with enabled and an optional segment list defaulting to ["prompt_char"].
  • zsh side: in a zle-line-finish hook, swap PROMPT to the pre-lowered transient string and zle reset-prompt; restore the full prompt in precmd (which already re-renders every prompt).
  • The worker can pre-lower the transient prompt once per config generation and ship it in the handshake (or alongside each Prompt record) so the swap is a pure variable assignment — zero IPC on the hot path.
  • Interaction to specify: multi-line input, Ctrl-C aborts, and RPROMPT clearing (RPROMPT='' in the transient state is the conventional choice).

Notes


🤖 Generated with Claude Code — Claude Fable 5

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priority or proposalarea:zshComponent: zshenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions