ZSH在C程序结果后自动打印'%'

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


This is a simple C program:

这是一个简单的C程序:

this is a simple C program

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

这是该计划的结果 - 注意最后的%。

this is the result of the C program , but here is the '%' at the end .

1 个解决方案

#1


4  

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):

当最后一行不以换行符结束时,zsh会输出%(默认情况下为普通用户)。否则可以通过提示擦除该部分线。添加换行符以正确终止最后一行(\ n):

printf("1\n");

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

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

智能推荐

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.itdaan.com/blog/2018/06/19/7202b1a6e0ce183e5b837d93811772f6.html



 
© 2014-2019 ITdaan.com 粤ICP备14056181号  

赞助商广告