1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-18 11:50:07 +00:00

Allow arguments to d to be passed to dirs

Replace the alias with a function. Call `dirs` if arguments are given to `d`.
This commit is contained in:
Ben Klein 2018-06-16 20:35:41 -04:00 committed by GitHub
parent c99844d848
commit b0a149076f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,14 @@ alias 9='cd -9'
alias md='mkdir -p'
alias rd=rmdir
alias d='dirs -v | head -10'
function d () {
if [[ -n $1 ]]; then
dirs "$@"
else
dirs -v | head -10
fi
}
compdef _dirs d
# List directory contents
alias lsa='ls -lah'