From 298ab38131694ad4af1acf95e423515779fa1ce1 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Mon, 20 Sep 2021 10:48:25 -0700 Subject: [PATCH] zsh: add auto syncing powers to todo() --- .zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index c05f77c..d71908d 100644 --- a/.zshrc +++ b/.zshrc @@ -161,7 +161,7 @@ # a simple way to manage your todo list # Usage: - # todo -- edit ~/todo + # todo -- pull latest repo version and edit ~/todo # todo auto -- commit and push ~/todo with message 'todo' # todo [any git command] -- manage todo for easy syncing, assuming ~/todo is # a symlink that points to a file in a git repo @@ -174,6 +174,7 @@ todo_dir="$(dirname "$(realpath ~/todo)")" if [ -z "$@" ];then cd "$(dirname "$(realpath ~/todo)")" + git pull $EDITOR ~/todo elif [ "$@" = 'auto' ];then cd "$todo_dir"