1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2026-04-23 14:53:27 +02:00

lib: pass arguments to d to dirs (#6924)

Replace the alias with a function. Call `dirs` if arguments are given to `d`.
This commit is contained in:
Marc Cornellà
2019-05-07 20:53:40 +02:00
committed by GitHub
+8 -1
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'