Centos7 bash 安装powerline

安装powerline

1
2
3
sudo yum install epel-release
sudo yum install python-pip
pip install powerline-status

查看安装位置 pip show powerline-status

1
2
3
4
5
6
7
8
9
10
Name: powerline-status
Version: 2.7
Summary: The ultimate statusline/prompt utility.
Home-page: https://github.com/powerline/powerline
Author: Kim Silkebaekken
Author-email: kim.silkebaekken+vim@gmail.com
License: MIT
Location: /usr/lib/python2.7/site-packages
Requires:
Required-by:



在 Bash Shell 中添加/启用 Powerline

1
2
3
4
5
6
if [ -f `which powerline-daemon` ]; then
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
. /usr/lib/python2.7/site-packages/powerline/bindings/bash/powerline.sh
fi

vim启用Powerline

1
2
3
4
" vi ~/.vimrc
set rtp+=/usr/lib/python2.7/site-packages/powerline/bindings/vim/
set laststatus=2
set t_Co=256

解决不能显示git分支问题

1
2
3
4
5
6
7
8
9
10
11
mkdir -p ~/.config/powerline
cat <<-'EOF' > ~/.config/powerline/config.json
{
"ext": {
"shell": {
"theme": "default_leftonly"
}
}
}
EOF
powerline-daemon --replace
欣赏此文? 求鼓励,求支持!