1
在终端的特定位置显示后台进程的标准输出
每次打开新终端或进行新登录时,我都有一条命令运行。 该程序产生的输出(彩色)应放在命令提示符之前。运行可能需要几秒钟,这将阻止我在此之前使用终端(除非在后台运行)。 鉴于zsh具有一些重绘终端而又不破坏现有文本的高级方法,我想知道如何以一种无需使用它就可以等待的方式运行此命令,但是我可以使用终端完成后,将打印输出,就好像它不是首先放在后台一样。 实际上,我希望可以做些什么: Command output: ... (running on background) me@computer: somecommand me@computer: someothercommand 命令完成后,我将得到: Command output: * Output foo * Multiple lines bar * and some yada me@computer: somecommand me@computer: someothercommand 我尝试在开始时将进程置于后台,但随后无法清晰显示输出。我得到类似的东西: Command output: [2] 32207 me@computer: somecommand me@computer: someother * Output foo * Multiple lines bar * and …