Skip to content

$starship_prompt includes $line_break and $character output #109

@evenkeelhuang

Description

@evenkeelhuang

Description

When using $starship_prompt in cship.toml, the rendered output includes $line_break and $character from the user's starship.toml format string. This causes an extra line with the prompt character (e.g. ) to appear below the starship prompt row in the status line.

Steps to Reproduce

  1. Have a starship.toml with a format that includes $line_break and $character:

    format = """
    [](red)\
    $os\
    ...
    $time\
    [ ](fg:lavender)\
    $cmd_duration\
    $line_break\
    $character"""
  2. Use $starship_prompt in cship.toml:

    [cship]
    lines = ["$starship_prompt", "$cship.model $cship.context_bar"]
  3. The status line renders an unwanted extra line containing between the starship row and the cship modules row.

Expected Behavior

$starship_prompt should strip $line_break and $character (and possibly $cmd_duration) from the output, since these are interactive shell prompt elements that don't make sense in a status line context.

Environment

  • cship v1.3.0
  • macOS (aarch64)
  • Starship installed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions