Navigation Menu

Skip to content

Commit

Permalink
better prompt, don't try to be smarter than virtualenv, and fix stupi…
Browse files Browse the repository at this point in the history
…d aliases
  • Loading branch information
Kiril Savino committed May 25, 2012
1 parent e9e679a commit 90ed671
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .profile
Expand Up @@ -30,7 +30,7 @@ function git-get-branch() { git branch --no-color 2> /dev/null | sed -e '/^[^*]/
function fancy-git-branch() { git-get-branch | sed -e 's/\(.*\)/ → \1/'; }
function git-current-repo() { git config --get remote.origin.url | sed -e "s/.*\/\(.*\)\.git/\1/" -e 's/^gc//'; }
function current-virtualenv() { echo $VIRTUAL_ENV | sed -e "s/.*\/\(.*\)/\1/"; }
function fancy-virtualenv() { current-virtualenv | sed -e "s/\([^\s]+\)/(\1)/"; }
function fancy-virtualenv() { echo `current-virtualenv` | sed -e "s/\([^\s]+\)/(\1)/"; }

function find-git-root() {
A=.
Expand All @@ -57,12 +57,13 @@ alias gd="git diff"
alias gow="git show"
alias gash="git stash"
alias grb="git rebase"
alias gsync="git pull --rebase && git push origin `git-get-branch`"
alias gsync="git pull --rebase && git push origin $(git-get-branch)"
alias gpr="git-pull-request"
alias gpx="git-pickaxe"
alias gpush="git push origin `git-get-branch`"
alias gpush="git push origin $(git-get-branch)"
alias gpull="git pull --rebase"
alias gco="git checkout"
alias gb="git checkout -b"

export PS1='$(fancy-virtualenv)\[\e[1;31m\]$(git-current-repo)\[\e[1;33m\]$(fancy-git-branch)\[\e[0;39m\]|\[\e[0;39m\]\W $ '
#export PS1='$(fancy-virtualenv)\[\e[1;31m\]$(git-current-repo)\[\e[1;33m\]$(fancy-git-branch)\[\e[0;39m\]|\[\e[0;39m\]\W $ '
export PS1='\[\e[1;31m\]$(git-current-repo)\[\e[1;33m\]$(fancy-git-branch)\[\e[0;39m\]|\[\e[0;39m\]\W $ '

0 comments on commit 90ed671

Please sign in to comment.