Add powerline shell prompt

This commit is contained in:
2019-09-21 01:36:29 -04:00
parent c4aa98b828
commit b8c6922e05
5 changed files with 78 additions and 4 deletions

View File

@@ -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