我有 MacOS 和.bash_profile内容:
.bash_profile
export PS1="\[\e[0;31m$\]\[\e[m\] \[\e[0;32m\w\e[m\] : \]"
结果我在终端中打印了这样的密码:
但是当我按向上和向下箭头使用终端历史记录时,我有错误:
command-line bash prompt command-history terminal
bash ×1
command-history ×1
command-line ×1
prompt ×1
terminal ×1