简体   繁体   中英

Printf puts a percent sign after everything it prints

Whenever I use printf in the shell whether it is within awk , a standalone application, or in C/C++ it prints a "%" after everything. For instance, when I type printf "hi" I get this as an output hi% . I am on Arch Linux using zsh as a shell and konsole as a terminal emulator. The font I use is MesloLGS NF.

Image:

我的终端

This is zsh 's way of telling you that the preceding command outputted a partial line and the shell terminated that line to give you a prompt on a new line.

You can disable this behavior by typing PROMPT_EOL_MARK='' into the command prompt.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM