美化 Shell

sudo apt install powerline

vi .bashrc

...........
POWERLINE_SCRIPT=/usr/share/powerline/bindings/bash/powerline.sh
if [ -f $POWERLINE_SCRIPT ]; then

source $POWERLINE_SCRIPT

fi

nano .bashrc

if [ "$color_prompt" = yes ]; then
    PS1='
${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \d [\t] : \[$
\$ '
else
    PS1='
${debian_chroot:+($debian_chroot)}\u@\h \d [\t] : \w
\$ '
fi

git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it

~/.bash_it/install.sh

Installing bash-it
Would you like to keep your .bashrc and append bash-it templates at the end? [y/N] y
Your original .bashrc has been backed up to .bashrc.bak
Bash-it template has been added to your .bashrc

Enabling reasonable defaudolts
bash-it enabled with priority 350.
system enabled with priority 350.
base enabled with priority 250.
alias-completion enabled with priority 365.
general enabled with priority 150.

Installation finished successfully! Enjoy bash-it!
To start using it, open a new tab or 'source /root/.bashrc'.

To show the available aliases/completions/plugins, type one of the following:
  bash-it show aliases
  bash-it show completions
  bash-it show plugins

To avoid issues and to keep your shell lean, please enable only features you really want to use.
Enabling everything can lead to issues.

Last updated