Browse Source

bash: git status with icon

Maxim Likhachev 5 years ago
parent
commit
b0136d1dd5
  1. 4
      etc/shell/bash/bashrc

4
etc/shell/bash/bashrc

@ -1,6 +1,6 @@
#!/bin/bash #################################################################### #!/bin/bash ####################################################################
# #
# Изменён: Чт 30 июл 2020 20:38:07 # Изменён: чт 20 авг 2020 16:36:56
# #
################################################################################ ################################################################################
@ -225,7 +225,7 @@ __prompt_command() {
# Сокращение текущей директории. В отличие от PROMPT_DIRTRIM выводит две директории в начале пути # Сокращение текущей директории. В отличие от PROMPT_DIRTRIM выводит две директории в начале пути
local PS1_PWD=$(pwd | sed 's@'$HOME'@~@; s@^\(\([~/][^/]*\)\{2\}/\).*\(\(/[^/]*\)\{2\}\)$@\1...\3@') local PS1_PWD=$(pwd | sed 's@'$HOME'@~@; s@^\(\([~/][^/]*\)\{2\}/\).*\(\(/[^/]*\)\{2\}\)$@\1...\3@')
local PS1_GIT=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/:\1/') local PS1_GIT=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/')
local PS1_PATH="─[${red}${VIFM_SHELL}${yellow}${PS1_PWD}${PROMPT_COLOR}${magenta}${PS1_GIT}${PROMPT_COLOR}]" local PS1_PATH="─[${red}${VIFM_SHELL}${yellow}${PS1_PWD}${PROMPT_COLOR}${magenta}${PS1_GIT}${PROMPT_COLOR}]"

Loading…
Cancel
Save