![Bash 4.4改变颜色vi模式](https://linux22.com/image/120435/Bash%204.4%E6%94%B9%E5%8F%98%E9%A2%9C%E8%89%B2vi%E6%A8%A1%E5%BC%8F.png)
我在用
+~ $ bash --version
GNU bash, version 4.4.0(1)-release (x86_64-unknown-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
并添加到我的~/.bashrc
set -o vi
并在我的/etc/inputrc
set show-mode-in-prompt on
set vi-cmd-mode-string "\1\e[1;31m\2:\1\e[0m\2"
但是,当我进入命令模式时,颜色保持不变。有人可以解决这个问题吗?只有主角从+
变为: