From this GitHub issue: https://github.com/starship/starship/issues/560
Enter this to modify Starship’s configuration:
starship config
Put this near the very top:
# Tuck "new line" inside the ($all) variable format = """($all )$character""" # No new line between shell prompts add_newline = false # No line-break between shell prompts [line_break] disabled = true
This works because anything inside of ($var)
is skipped if $var
is empty, and luckily this includes (or does not explicitly exclude/trim) a trailing new-line.