/
oglu
/
dotfiles
Обзор
Документация
Войти
/
oglu
/
dotfiles
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
tag-gentoo/bashrc
25 строк
748 B
oglu
git branch red color
21 янв 2026, 19:30
21 янв 2026, 19:30
024aa63
Код
Авторство
О чём код?
# /etc/skel/.bashrc # # This file is sourced by all *interactive* bash shells on startup, # including some apparently interactive shells such as scp and rcp # that can't tolerate any output. So make sure this doesn't display # anything or bad things will happen ! # Test for an interactive shell. There is no need to set anything # past this point for scp and rcp, and it's important to refrain from # outputting anything in those cases. if [[ $- != *i* ]] ; then # Shell is non-interactive. Be done now! return fi # Put your fun stuff here. #PS1='\W \[\e[0;32m\]\$\[\e[0m\] ' parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } PS1='\W\[\e[0;31m\]$(parse_git_branch) \[\e[0;32m\]\$\[\e[0m\] '