Updated Bashrc + PS2 config

This commit is contained in:
Daniel Legt 2023-12-26 19:07:51 +02:00
parent bfff2af0b2
commit d7afe481e5
2 changed files with 6 additions and 4 deletions

View File

@ -32,9 +32,9 @@ git_branch_tag() {
# If we are in a git repository and there is a tag
if [[ -n $branch && -n $tag ]]; then
echo -n " ($branch:$tag) "
echo -n " ($branch:$tag)"
elif [[ -n $branch ]]; then
echo -n " ($branch) "
echo -n " ($branch)"
fi
}
@ -142,5 +142,7 @@ alias n_ports='netstat -tulanp'
# export PS1=" \[\033[38;5;220m\]кπ \[\033[38;5;192m\]\w\[\e[0m\]\$(__git_ps1 ' \[\e[38;5;87m\]%s\[\e[0m\]')\$ "
# export PS1=" \[\033[38;5;220m\]кπ \[\033[38;5;192m\]\w\[\e[0m\]\$(if [[ \$(git rev-parse --is-inside-work-tree 2>/dev/null) == 'true' ]]; then echo -n ' \[\e[38;5;87m\]'; git_branch_tag; echo -n '\[\e[0m\]'; fi)\$ "
PS1='\\$ \[\e[38;5;186m\]\u \[\e[38;5;152m\](\[\e[38;5;149m\]\W\[\e[38;5;152m\])\ \[\e[38;5;117;1m\]~ \[\e[0m\]'
PS1='\\$ \[\e[38;5;186m\]\u \[\e[38;5;152m\](\[\e[38;5;149m\]\W\[\e[38;5;152m\])\[\e[38;5;87m\]$(git_branch_tag)\[\e[38;5;117;1m\]~ \[\e[0m\]'
# PS1='\\$ \[\e[38;5;186m\]\u \[\e[38;5;152m\](\[\e[38;5;149m\]\W\[\e[38;5;152m\])\ \[\e[38;5;117;1m\]~ \[\e[0m\]'
export PS1='\\$ \[\e[38;5;186m\]\u \[\e[38;5;152m\](\[\e[38;5;149m\]\W\[\e[38;5;152m\])\[\e[38;5;87m\]$(git_branch_tag)\[\e[38;5;117;1m\]~ \[\e[0m\]'
export PS2="\[\e[38;5;186m\]> "

0
n Normal file
View File