Centos命令行窗口显示一大串前缀,777;notify;Command completed;的解决方法

How to remove the return code from the terminal prompt

In addition to the PS1 environment variable, the PROMPT_COMMAND environment variable also affects your prompt. From the bash man page:

If set, the value is executed as a command prior to issuing each primary prompt

It is that command that is adding the unwanted content to your prompt. You can stop that behavior by unsetting the variable in your .bashrc:

unset PROMPT_COMMAND

猜你喜欢

转载自www.cnblogs.com/lenmom/p/9559042.html