]> Sergey Matveev's repositories - dotfiles.git/commitdiff
Simplify format of .zhashd
authorSergey Matveev <stargrave@stargrave.org>
Fri, 14 May 2021 10:02:48 +0000 (13:02 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 14 May 2021 10:02:48 +0000 (13:02 +0300)
zsh/.zshrc

index 7a8164246d6bcbe571e7dc24ad85b34a8d16dc3c..45b63a6de76f8a8300b05f9f672c723e11c37885 100644 (file)
@@ -165,10 +165,6 @@ alias arr="mutt -f \=arbeit -e 'source ~/.mutt/accounts/stcnet.ru'"
 bindkey -s "\eOP" " inc\n" # F1
 # }}}
 
 bindkey -s "\eOP" " 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\_}'
 # 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
 }
 # }}}
     [[ -z $dir ]] || cd $dir
 }
 # }}}
+
+# Named directories {{{
+while read w ; do
+    w=(${(s/=/)w})
+    hash -d ${w[1]}=${~${w[2]}}
+done < ~/.zhashd
+# }}}