From 063db819b49367211edd27f2f084001516ebadb9 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Thu, 16 Sep 2021 00:40:55 -0700 Subject: [PATCH] zsh: todo() now changes the working dir --- .zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.zshrc b/.zshrc index 751a5bd..430fc25 100644 --- a/.zshrc +++ b/.zshrc @@ -164,6 +164,7 @@ todo() { ( # subshell to protect against directory changes if [ -z "$@" ];then + cd "$(dirname "$(realpath ~/todo)")" $EDITOR ~/todo else cd "$(dirname "$(realpath ~/todo)")"