Replies: 3 comments 2 replies
-
Hello 1trapbox, you need to escape the carriage return in the format string with three quotes—see: Default Prompt Format. Take care |
Beta Was this translation helpful? Give feedback.
-
I've been struggling with this as well. The problem is that what we're writing is basically: format = """\n
$username$os$directory\n
$python\n
$status$cmd_duration\n
$character"" So if python is empty, the format ends up: format = """\n
$username$os$directory\n
\n
$status$cmd_duration\n
$character"" Cause you write the python section on a new line.
Nvm we got conditional formatting see next comment!
|
Beta Was this translation helpful? Give feedback.
-
I've been a liar!' Starship has conditional format strings So all you have to do is: format = """
$username$os$directory
($python\n)\
$status$cmd_duration
$character"" and if you're using [line_break]
disabled = true |
Beta Was this translation helpful? Give feedback.
-
config toml info
format(global)
python(Simple default configuration)
When I use the following configuration
format(global)
shell style
When I use the following configuration (added python)
format(global)
shell style (In a directory without python)
shell style (In a directory with python)
In the directory without python, I found an extra blank line.
Everything is fine in the directory with python.
How can I avoid the appearance of blank lines?
I tried replacing
$python
with$all
in format. but it will still show a blank line.Beta Was this translation helpful? Give feedback.
All reactions