X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/d851861997240e29ef459999b673d32967492bea..6a5f3187cb8cc0d7d3463ff97dddd415642c95b9:/.zsh/zshrc/82-load_dirhashes-d diff --git a/.zsh/zshrc/82-load_dirhashes-d b/.zsh/zshrc/82-load_dirhashes-d new file mode 100644 index 0000000..4d91dd0 --- /dev/null +++ b/.zsh/zshrc/82-load_dirhashes-d @@ -0,0 +1,22 @@ +# +# Turn symlinks in $dhpath directories into dirhashes +# +# Copyright © 1994–2017 martin f. krafft +# Released under the terms of the Artistic Licence 2.0 +# +# Source repository: http://git.madduck.net/v/etc/zsh.git +# + +for dh in $dhpath; do + if [ ! -d "$dh" ]; then + zerror "no such directory: $dh" + continue + fi + +# zdebug "sourcing dirhashes directory ${dh#$ZDOTDIR/}" + for l in "$dh"/*(@); do + eval hash -d "$l:t"="$l:A" + done +done + +# vim:ft=zsh