Bash: simplify path alias, find shorthand alias.

This commit is contained in:
Artem Sapegin 2012-11-15 16:31:00 +04:00
parent 7332f12e14
commit 8eed53cbaa
2 changed files with 6 additions and 1 deletions

View File

@ -75,7 +75,7 @@ alias dos2unix="perl -pi -e 's/\r\n?/\n/g'"
password() { openssl rand -base64 ${1:-8} | c; }
# Show $PATH in a readable way
alias path='echo $PATH | sed "s/:/\n/g"'
alias path='echo -e ${PATH//:/\\n}'
# Git root
alias gr='git rev-parse 2>/dev/null && cd "./$(git rev-parse --show-cdup)"'

View File

@ -3,6 +3,11 @@ function md() {
mkdir -p "$@" && cd "$@"
}
# Find shorthand
function f() {
find . -name "$1"
}
# Get gzipped file size
function gz() {
echo "Original size (bytes): "