ZSH 在 C 程序的结果后自动打印 '%' [英] ZSH print '%' automatically after the result of the C program
本文介绍了ZSH 在 C 程序的结果后自动打印 '%'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是一个简单的 C 程序:
This is a simple C program:
这是那个程序的结果——注意最后的%
.
This is the result of that program -- note the %
at the end.
推荐答案
zsh 在最后一行不以换行符结束时打印 %
(对于普通用户默认).否则,该部分行可能会被提示删除.添加换行符以正确终止最后一行 (\n
):
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
这篇关于ZSH 在 C 程序的结果后自动打印 '%'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文