zsh: todo() now changes the working dir

This commit is contained in:
PowerUser64 2021-09-16 00:40:55 -07:00
parent f26343fc7a
commit 84799e257c

1
.zshrc
View file

@ -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)")"