小编Vla*_*nko的帖子

浏览历史记录时 Bash 提示出现乱码?

我有 MacOS 和.bash_profile内容:

export PS1="\[\e[0;31m$\]\[\e[m\] \[\e[0;32m\w\e[m\] : \]"

结果我在终端中打印了这样的密码:

屏幕截图

但是当我按向上和向下箭头使用终端历史记录时,我有错误:

在此处输入图片说明

command-line bash prompt command-history terminal

1
推荐指数
1
解决办法
618
查看次数

标签 统计

bash ×1

command-history ×1

command-line ×1

prompt ×1

terminal ×1