diff options
| author | Marc Cornellà <marc.cornella@live.com> | 2019-05-07 20:53:40 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-07 20:53:40 +0200 | 
| commit | 239649ae6a6ab63f2a6cbfac3eae5911e94e1b9b (patch) | |
| tree | b085045b1e121116db95635a342f57a657e859fd /lib | |
| parent | 78b241b16ae34da0c6e0c3c2f0591f3f49e42980 (diff) | |
| parent | b0a149076fc39ff2707279c2246744378643c0d5 (diff) | |
| download | zsh-239649ae6a6ab63f2a6cbfac3eae5911e94e1b9b.tar.gz zsh-239649ae6a6ab63f2a6cbfac3eae5911e94e1b9b.tar.bz2 zsh-239649ae6a6ab63f2a6cbfac3eae5911e94e1b9b.zip | |
lib: pass arguments to `d` to dirs (#6924)
Replace the alias with a function. Call `dirs` if arguments are given to `d`.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/directories.zsh | 9 | 
1 files changed, 8 insertions, 1 deletions
| diff --git a/lib/directories.zsh b/lib/directories.zsh index 14064b86f..355c442d2 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -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' | 
