Add powerline shell prompt
This commit is contained in:
16
bash/.bashrc
16
bash/.bashrc
@@ -57,11 +57,19 @@ if [ -n "$force_color_prompt" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\][\u@\h\[\033[00m\] \W\[\033[01;32m\]]\$\[\033[00m\]'
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}[\u@\h \W]\$ '
|
||||
function _update_ps1() {
|
||||
PS1=$(powerline-shell $?)
|
||||
}
|
||||
|
||||
if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then
|
||||
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
|
||||
fi
|
||||
|
||||
" if [ "$color_prompt" = yes ]; then
|
||||
" PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\][\u@\h\[\033[00m\] \W\[\033[01;32m\]]\$\[\033[00m\]'
|
||||
" else
|
||||
" PS1='${debian_chroot:+($debian_chroot)}[\u@\h \W]\$ '
|
||||
" fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
|
||||
Reference in New Issue
Block a user