-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbashrc
36 lines (28 loc) Β· 1.17 KB
/
bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File: .bashrc
# Creation Date: 2013
# Author: Samuel El-Borai <[email protected]>
# Website: https://github.com/dgellow/config
# Description: My bashrc
##ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
## 0. Meta
# Check for an interactive session
[ -z "$PS1" ] && return
##ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
## 1. Prompt
source ~/.git-prompt.sh
function git_prompt_branch() {
GIT_PS1_SHOWDIRTYSTATE="false"
GIT_PS1_SHOWSTASHSTATE="false"
GIT_PS1_SHOWUNTRACKEDFILES="true"
GIT_PS1_SHOWUPSTREAM="auto"
GIT_PS1_SHOWCOLORHINTS="true"
local branch=$(__git_ps1)
echo $branch
}
function composition() {
local branch=$(git_prompt_branch)
if [[ -n "$rvm_version" ]] || [[ -n "$branch" ]]; then
branch="\e[1;33m$branch"
fi
}
PS1="\n \e[1;31mREC Β°\e[0m: \D{%d-%m-%y %H:%M:%S} \u/\e[4m\h\e[0m \w\$(composition)\e[0m\n -> "