[LINUX] I put in a Bash called Powerline-shell that makes me crazy

(vocabulary)

What is Powerline?

It's the one that improves the visibility of vim's status line and prompts such as bash and zsh. ~~ I gave up because the settings were not reflected well ~~

What is Powerline-shell?

Improves visibility of prompts such as bash and zsh. It seems that it was made to look like Powerline, but it seems that there is no other relationship. I haven't used vim so much, so I will use it this time.

Environment

Installation

$ pip3 install powerline-shell

Add the following script to .bashrc

.bashrc


function _update_ps1() {
    PS1=$(powerline-shell $?)
}

if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then
    PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi

Now when you restart the terminal it will be reflected like this スクリーンショット_2020-07-25_20-57-47.png

The customization method is also described in the README of Powerline-shell.

in conclusion

Qiita's first post, so if you point out, it would be helpful

Recommended Posts

I put in a Bash called Powerline-shell that makes me crazy
A memo that I wrote a quicksort in Python
I made a crazy thing called typed tuple
I made a script to put a snippet in README.md
A word that I was interested in as a programming beginner
I tried "a program that removes duplicate statements in Python"
I wrote a script that splits the image in two
I made a slack bot that notifies me of the temperature
I get a UnicodeDecodeError in mecab-python3
I get a KeyError in pyclustering.xmeans
I put Arch in XPS 13 (7390) (Note)
I made a web application in Python that converts Markdown to HTML
I made a Discord bot in Python that translates when it reacts
I tried to develop a Formatter that outputs Python logs in JSON
I made a tool that makes decompression a little easier with CLI (Python3)
[IOS] I made a widget that displays Qiita trends in Pythonista3. [Python]