From: Sergey Matveev Date: Fri, 14 May 2021 10:02:48 +0000 (+0300) Subject: Simplify format of .zhashd X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=commitdiff_plain;h=1de3d4b7a55b2628eeccb0dd704c554bf8aee63e Simplify format of .zhashd --- diff --git a/zsh/.zshrc b/zsh/.zshrc index 7a81642..45b63a6 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -165,10 +165,6 @@ alias arr="mutt -f \=arbeit -e 'source ~/.mutt/accounts/stcnet.ru'" bindkey -s "OP" " inc\n" # F1 # }}} -# Named directories {{{ -. ~/.zhashd -# }}} - # Completion {{{ zstyle ":completion:*:functions" ignored-patterns "_*" zstyle ":completion:*" matcher-list "" 'm:{a-z\-}={A-Z\_}' 'r:|?=** m:{a-z\-}={A-Z\_}' @@ -217,3 +213,10 @@ cf() { [[ -z $dir ]] || cd $dir } # }}} + +# Named directories {{{ +while read w ; do + w=(${(s/=/)w}) + hash -d ${w[1]}=${~${w[2]}} +done < ~/.zhashd +# }}}