Getting a weird percent sign in printf output in terminal with C

When (non-null) output from a program doesn’t include a trailing newline, zsh adds that color-inverted % to indicate that and moves to the next line before printing the prompt; it’s generally more convenient than bash’s behavior, just starting the command prompt where the output ended.

Leave a Comment