From 4a7b6c465c38e19b390889d4c911c8cab462d9a0 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Thu, 16 Dec 2021 03:33:18 -0800 Subject: [PATCH] zsh: save_working_directory() will no longer save the home directory --- .zshrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index eb70c2a..4bed74b 100644 --- a/.zshrc +++ b/.zshrc @@ -800,7 +800,9 @@ load_working_dir() { } save_working_dir() { - pwd > "$WORKING_DIR_SAVE_FILE" + if [ "$(pwd)" != "$HOME" ];then + pwd > "$WORKING_DIR_SAVE_FILE" + fi } autoload -U add-zsh-hook