From 55875639c696c8a78c95000b026d4432934455a7 Mon Sep 17 00:00:00 2001 From: Maxim Likhachev Date: Tue, 18 Feb 2020 16:26:05 +0300 Subject: [PATCH] =?UTF-8?q?bash:=20=D0=B2=D0=B5=D1=82=D0=BA=D0=B0=20git=20?= =?UTF-8?q?=D0=B2=20=D0=BF=D1=80=D0=B8=D0=B3=D0=BB=D0=B0=D1=88=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- etc/shell/bash/bashrc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/etc/shell/bash/bashrc b/etc/shell/bash/bashrc index c05cd1a..a3e3fcb 100755 --- a/etc/shell/bash/bashrc +++ b/etc/shell/bash/bashrc @@ -1,6 +1,6 @@ #!/bin/bash #################################################################### # -# Изменён: вт 18 фев 2020 15:37:12 +# Изменён: Вт 18 фев 2020 16:25:24 # ################################################################################ @@ -180,16 +180,18 @@ else #export HOME=$HOME fi +__ps1_git() { + git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/:\1/' +} + PS1_JOBS="${PROMPT_COLOR}┌─(${yellow}\j${PROMPT_COLOR})" PS1_HOST="─[${yellow}\h${PROMPT_COLOR}]${PROMPT_SHH}" -PS1_CWD="─[${red}${VIFM_SHELL}${yellow}\w${PROMPT_COLOR}]\n" - -PS1_LINE1="${PS1_JOBS}${PS1_HOST}${PS1_CWD}" -PS1_LINE2="${PROMPT_COLOR}─[${PROMPT_COLOR}\t]\$ $rstc" +PS1_GIT="${blue}$(__ps1_git)${PROMPT_COLOR}" +PS1_LINE2="\n${PROMPT_COLOR}─[${PROMPT_COLOR}\t]\$ $rstc" -PS1="${PS1_LINE1}${PS1_LINE2}" +export PS1="${PS1_JOBS}${PS1_HOST}─[${red}${VIFM_SHELL}${yellow}\w${PROMPT_COLOR}${blue}\$(__ps1_git)${PROMPT_COLOR}]${PS1_LINE2}" -unset PS1_JOBS PS1_HOST PS1_CWD PS1_LINE1 PS1_LINE2 +unset PS1_JOBS PS1_HOST PS1_LINE1 PS1_LINE2 # }}} ########################################################################## # {{{ Подключение псевдонимов