Last active
June 6, 2023 15:19
-
-
Save AlekseyArh/5776507a0ed437be1121c92747969c4d to your computer and use it in GitHub Desktop.
Отображение git ветки на сервере
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gitBranch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ [\1]/' | |
} | |
#server | |
PS1='\[\e[38;5;15m\]\u\[\e[38;5;7m\]@\[\e[38;5;9m\]\h\[\e[38;5;7m\]:\[\e[38;5;45m\]\w\[\033[0m\]\[\033[01;33m\]$(gitBranch)\[\033[00m\] \$ ' | |
#local | |
#PS1='\[\e[38;5;10m\]\u\[\e[38;5;7m\]@\[\e[38;5;10m\]\h\[\e[38;5;7m\]:\[\e[38;5;45m\]\w\[\033[0m\]\[\033[01;33m\]$(gitBranch)\[\033[00m\] \$ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment