From a67649e844e1e35eb784859061432fc06ae5ebaa Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Thu, 30 Jul 2020 11:23:30 +0100 Subject: [PATCH] Add frequent-directory function `frequent-directory` exports and environment variable and creates a hash directory with the given argument of the form `=`. --- zshrc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zshrc b/zshrc index 57ec25c..cb6ae6d 100644 --- a/zshrc +++ b/zshrc @@ -173,6 +173,10 @@ if [[ ! -z "$cursor_block" && ! -z "$cursor_line" ]]; then zle -N zle-line-finish fi +# Frequntly used directories +function frequent-directory() { export $1; hash -d $1 } +frequent-directory Projects="$HOME/Projects" + # Load work related config [ -f ~/.config/work/zshrc ] && source ~/.config/work/zshrc @@ -205,6 +209,3 @@ case `uname` in alias debug='lldb --' ;; esac - -# Hashed Directories -hash -d Projects="$HOME/Projects"