From 1de3d4b7a55b2628eeccb0dd704c554bf8aee63e Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Fri, 14 May 2021 13:02:48 +0300 Subject: [PATCH] Simplify format of .zhashd --- zsh/.zshrc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 +# }}} -- 2.44.0