shell: -open aliases from common aliases; add per-OS ls color aliases
This commit is contained in:
parent
f84d5a5a4b
commit
f1b0439715
|
@ -10,7 +10,6 @@ alias ..='cd .. && ls'
|
||||||
alias ...='cd ../.. && ls'
|
alias ...='cd ../.. && ls'
|
||||||
alias ....='cd ../../.. && ls'
|
alias ....='cd ../../.. && ls'
|
||||||
alias -- -='cd - && ls'
|
alias -- -='cd - && ls'
|
||||||
cdl() { cd "$1" && ls -l; }
|
|
||||||
|
|
||||||
alias ln="${aliases[ln]:-ln} -v" # verbose ln
|
alias ln="${aliases[ln]:-ln} -v" # verbose ln
|
||||||
alias l='ls -l'
|
alias l='ls -l'
|
||||||
|
@ -44,12 +43,15 @@ alias exe='exercism'
|
||||||
# .gitattributes | map dirname
|
# .gitattributes | map dirname
|
||||||
alias map="xargs -n1"
|
alias map="xargs -n1"
|
||||||
|
|
||||||
o() { open "${1:-.}" }
|
# Colored ls
|
||||||
|
case $OSTYPE in
|
||||||
|
darwin*) alias ls='ls -G' ;;
|
||||||
|
linux*) alias ls='ls --color=auto' ;;
|
||||||
|
esac
|
||||||
|
|
||||||
take() { mkdir "$1" && cd "$1"; }
|
take() { mkdir "$1" && cd "$1"; }
|
||||||
hex() { echo -n $@ | xxd -psdu; }
|
hex() { echo -n $@ | xxd -psdu; }
|
||||||
|
|
||||||
if command -v compdef >/dev/null; then
|
if command -v compdef >/dev/null; then
|
||||||
compdef cdl=cd
|
|
||||||
compdef o=open
|
|
||||||
compdef take=mkdir
|
compdef take=mkdir
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue