From 510b7c3d6d9b7f90bec8f3aef15e872750a4f135 Mon Sep 17 00:00:00 2001 From: Arti Zirk Date: Thu, 10 Jun 2021 12:53:08 +0300 Subject: [PATCH] Remove need to prepend hashed dirs with ~ --- .zshrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index 9440017..1bcfe72 100644 --- a/.zshrc +++ b/.zshrc @@ -61,8 +61,8 @@ function chpwd_leave_profile_krakul() { chpwd_profiles hash -d krakul=~/code/krakul # shorten dir name in prompt - function hash_projects() { + # hash everything under krakul projects local project_folder for project_folder in ~/code/krakul/*; do hash -d "${project_folder:t}"="${project_folder}" @@ -71,6 +71,9 @@ function hash_projects() { } hash_projects +# remove need to add ~ in front of hashed dirs +setopt cdable_vars + # Enable or disable python virtual env function chpwd_auto_python_venv() { local venv_dir