# 美化 Shell

## sudo apt install powerline

### vi .bashrc

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

source $POWERLINE_SCRIPT

fi

```

nano .bashrc

```bash
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
```

{% embed url="<https://github.com/ohmybash/oh-my-bash>" %}

{% embed url="<https://github.com/Bash-it/bash-it>" %}

git clone --depth=1 <https://github.com/Bash-it/bash-it.git> \~/.bash\_it

\~/.bash\_it/install.sh

```bash
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.
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kawsing.gitbook.io/opensystem/andoid-shou-ji/untitled-4/linux-cli/mei-hua-shell.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
