Bash: simplify path alias, find shorthand alias.
This commit is contained in:
parent
7332f12e14
commit
8eed53cbaa
@ -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)"'
|
||||
|
@ -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): "
|
||||
|
Loading…
Reference in New Issue
Block a user