(Disclaimer: I am using fish, but this should apply equally to bash)
My current shell prints a newline before the prompt so I can easily find it between command outputs.
# [...]
echo # newline before prompt
echo -s $arrow ' ' $cwd $git_info
echo -n -s '❯ '
However, the newline is also printed when there is no previous output, e.g. after clearing the terminal with printf "\033c"
(or when the terminal is first opened):
<--- bad newline: no previous output
➜ /some/dir
❯ command1
output...
<--- good newline
➜ /some/dir
❯ command2
Question: is there any way I can get rid of this small aesthetic annoyance?
Edit #1:
For clarification: By "no previous output" I meant the contents of my console are empty, i.e. after (re-)initializing the terminal (because that's all printf "\033c"
does).