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; }
|
password() { openssl rand -base64 ${1:-8} | c; }
|
||||||
|
|
||||||
# Show $PATH in a readable way
|
# Show $PATH in a readable way
|
||||||
alias path='echo $PATH | sed "s/:/\n/g"'
|
alias path='echo -e ${PATH//:/\\n}'
|
||||||
|
|
||||||
# Git root
|
# Git root
|
||||||
alias gr='git rev-parse 2>/dev/null && cd "./$(git rev-parse --show-cdup)"'
|
alias gr='git rev-parse 2>/dev/null && cd "./$(git rev-parse --show-cdup)"'
|
||||||
|
@ -3,6 +3,11 @@ function md() {
|
|||||||
mkdir -p "$@" && cd "$@"
|
mkdir -p "$@" && cd "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Find shorthand
|
||||||
|
function f() {
|
||||||
|
find . -name "$1"
|
||||||
|
}
|
||||||
|
|
||||||
# Get gzipped file size
|
# Get gzipped file size
|
||||||
function gz() {
|
function gz() {
|
||||||
echo "Original size (bytes): "
|
echo "Original size (bytes): "
|
||||||
|
Loading…
Reference in New Issue
Block a user