diff --git a/.zshrc b/.zshrc index f8ea0c1..91c1c14 100644 --- a/.zshrc +++ b/.zshrc @@ -1,7 +1,7 @@ #!/bin/zsh # Blake's ZSH config file -# vim:fdm=marker:fmr=>>>,<<<:expandtab:sw=3 +# vim:fdm=marker:fmr=>>>,<<<:et:ft=zsh:sw=3 ### Basic shell configuration >>> ### Environment variables >>> @@ -87,7 +87,6 @@ alias \ nvc="(cd ~/.config/nvim && nvim)" \ zshrc="$EDITOR ~/.zshrc" \ - todo="$EDITOR ~/todo" \ fstab="sudo $EDITOR /etc/fstab" \ # Git cLONE @@ -157,6 +156,13 @@ done } + # an improved way to manage the todo list + todo() { + cd "$(dirname "$(realpath ~/todo)")" + test -d .git || git rev-parse --git-dir > /dev/null 2>&1 && echo 'pulling repository' && git pull + "$EDITOR" ~/todo + } + # Simple extraction script. Taken from manjaro's .bashrc ex() { if [ -f $1 ] ; then