Bash: add path printer, fix Git root.

This commit is contained in:
Artem Sapegin 2012-11-01 15:25:40 +04:00
parent 296ecfa25d
commit 1ece0b4789
1 changed files with 4 additions and 1 deletions

View File

@ -74,8 +74,11 @@ alias dos2unix="perl -pi -e 's/\r\n?/\n/g'"
# Password generator
password() { openssl rand -base64 ${1:-8} | c; }
# Show $PATH in a readable way
alias path='echo $PATH | sed "s/:/\n/g"'
# Git root
alias gr="[ ! -z `git rev-parse --show-cdup` ] && cd `git rev-parse --show-cdup || pwd`"
alias gr='git rev-parse 2>/dev/null && cd "./$(git rev-parse --show-cdup)"'
# NPM
alias npm-patch='npm version patch -m "%s"'