Created
September 19, 2016 15:49
-
-
Save sebasjm/3deb84b78ca48cb64ff3fb75259d6d3e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
[user] | |
name = Sebastian Javier Marchano | |
email = <email> | |
[color] | |
branch = auto | |
diff = auto | |
status = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = white bold | |
frag = magenta bold | |
old = red bold | |
new = green bold | |
[color "status"] | |
added = yellow | |
changed = green | |
untracked = cyan | |
[alias] | |
st = status -sb | |
ci = commit | |
br = branch | |
co = checkout | |
df = diff | |
dc = diff --cached | |
lg = log -p | |
lol = log --graph --decorate --pretty=oneline --abbrev-commit | |
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
ls = ls-files | |
# Show files ignored by git: | |
ign = ls-files -o -i --exclude-standard | |
[core] | |
autocrlf = false | |
[push] | |
default = simple |
This file contains hidden or 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
PRELABEL='' | |
GIT_PS1_SHOWSTASHSTATE=true | |
GIT_PS1_SHOWUNTRACKEDFILES=true | |
function prompt_command { | |
_date_length=" $(date +"%d %b %X") " | |
_git_status="$(__git_ps1) " | |
let prompt_x=$(( $COLUMNS - ${#PRELABEL} - ${#PWD} - ${#USER} - ${#_date_length} - ${#HOSTNAME} - ${#_git_status} - 1 - 1)) | |
if [ $prompt_x -lt 0 ]; then prompt_x=0; fi | |
} | |
PROMPT_COMMAND=prompt_command | |
PS1='\[\e[4;31m\]'$PRELABEL'\[\e[1;37m\]\[\e[2;4;33m\]$PWD\[\e[0;37m\]\[\e[${prompt_x}C\]${_git_status}\[\e[4;31m\]\u\[\e[1;37m\]@\[\e[4;32m\]\H\[\e[0;39m\] - \[\e[4;35m\]\D{%d %b %X}\[\e[0m\]\n$ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment