shell aliases: cd + ls; +cdl
This commit is contained in:
parent
6e666c7c79
commit
b32171f6be
|
@ -6,10 +6,11 @@ alias q='exit'
|
||||||
alias clr='clear'
|
alias clr='clear'
|
||||||
alias sudo='sudo '
|
alias sudo='sudo '
|
||||||
|
|
||||||
alias ..='cd ..'
|
alias ..='cd .. && ls'
|
||||||
alias ...='cd ../..'
|
alias ...='cd ../.. && ls'
|
||||||
alias ....='cd ../../..'
|
alias ....='cd ../../.. && ls'
|
||||||
alias -- -='cd -'
|
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 +45,11 @@ alias exe='exercism'
|
||||||
alias map="xargs -n1"
|
alias map="xargs -n1"
|
||||||
|
|
||||||
o() { open "${1:-.}" }
|
o() { open "${1:-.}" }
|
||||||
c() { cd "$1" && ls -l; }
|
|
||||||
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 o=open
|
||||||
compdef c=cd
|
|
||||||
compdef take=mkdir
|
compdef take=mkdir
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue