Is there a way for a backgrounded task to inform the terminal to print a new prompt?
问题 I want to write a program that can be run as a backgrounded task (i.e. my-thing & ), and that will beautifully provide relevant output when necessary. However, with background tasks that print to the terminal, there's always this annoying little progression: bash-3.2$ my-thing & ▏ bash-3.2$ my-thing & bash-3.2$ -- Hello from my-thing! -- now let me start doing what I do best ... ▏ … notice that we now have no prompt before the cursor, not to mention that there's an ugly erraneous prompt where