Unverified Commit b0a14907 authored by Ben Klein's avatar Ben Klein Committed by GitHub
Browse files

Allow arguments to `d` to be passed to dirs

Replace the alias with a function. Call `dirs` if arguments are given to `d`.
parent c99844d8
...@@ -21,7 +21,14 @@ alias 9='cd -9' ...@@ -21,7 +21,14 @@ alias 9='cd -9'
alias md='mkdir -p' alias md='mkdir -p'
alias rd=rmdir 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 # List directory contents
alias lsa='ls -lah' alias lsa='ls -lah'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment