ZSH print '%' automatically after the result of the C program [closed]

十年热恋 提交于 2019-12-04 07:01:06

问题


This is a simple C program:

This is the result of that program -- note the % at the end.


回答1:


zsh prints a % (by default for a normal user) when the last line does not end with a newline character. This partial line could be erased by the prompt otherwise. Add a newline to properly terminate the last line (\n):

printf("1\n");

http://zsh.sourceforge.net/Doc/Release/Options.html#index-PROMPT_005fSP



来源:https://stackoverflow.com/questions/50918949/zsh-print-automatically-after-the-result-of-the-c-program

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!