Skip to content

Instantly share code, notes, and snippets.

View dubglan's full-sized avatar

Gleb Dubovik dubglan

View GitHub Profile
@dubglan
dubglan / profile
Last active April 18, 2017 19:06 — forked from wolever/profile
Fixed colored prompt that works under tmux.
# prompt examples:
# [3 jobs master virtualenv] ~/code/myproject/foo
# [1 job my-branch virtualenv] ~/code/bar/
# [virtualenv] ~/code/
# ~
# Very, very fast, only requiring a couple of fork()s (and no forking at all to determine the current git branch)
if [[ "$USER" == "root" ]]
then
export PS1="\[\e[1;31m\]\u \[\e[1;33m\]\w\[\e[0m\] ";