Bash 4.4改变颜色vi模式

Bash 4.4改变颜色vi模式

我在用

+~ $ 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"

但是,当我进入命令模式时,颜色保持不变。有人可以解决这个问题吗?只有主角从+变为:

相关内容