Skip to content

sanitize_prompt clears output from commands without newline #4587

@guritso

Description

@guritso

System details

  • Shell: bash
  • Terminal: xterm-ghostty
  • Omarchy branch: dev
  • Commit: 49a2941

What's wrong?

curl ifconfig.me

The IP appears briefly then disappears.

Works fine:

curl ifconfig.io  # has newline - output stays visible
curl ifconfig.me && echo  # adds newline - output stays visible

Root cause

__sanitize_prompt() { printf '\r\033[K'; }

The \r\033[K clears the entire line. When a command outputs without a trailing newline, the cursor stays on the same line as the output, so the sanitization clears it along with the prompt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions