Merge branch 'master' of git.blakenorth.net/home/git/dotfiles
This commit is contained in:
commit
2b5a866f8c
1 changed files with 12 additions and 6 deletions
18
.zshrc
18
.zshrc
|
@ -154,12 +154,16 @@
|
|||
done
|
||||
}
|
||||
|
||||
# an improved way to manage the todo list
|
||||
# a simple way to manage your todo list
|
||||
# Usage:
|
||||
# todo -- edit ~/todo
|
||||
# todo auto -- commit ~/todo and push with message 'todo'
|
||||
# todo [git command string] -- manage todo for easy syncing, assuming ~/todo is
|
||||
# todo -- 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
|
||||
#
|
||||
# Suggested use: make a git repo for holding your todo list, then make
|
||||
# a symlink called 'todo' that points to your todo list in your home directory
|
||||
#
|
||||
todo() {
|
||||
( # subshell to protect against directory changes
|
||||
todo_dir="$(dirname "$(realpath ~/todo)")"
|
||||
|
@ -168,7 +172,8 @@
|
|||
$EDITOR ~/todo
|
||||
elif [ "$@" = 'auto' ];then
|
||||
cd "$todo_dir"
|
||||
git commit "$(realpath ~/todo)" -m 'todo' && todo push
|
||||
git commit "$(realpath ~/todo)" -m 'todo'
|
||||
git push
|
||||
else
|
||||
cd "$todo_dir"
|
||||
git $@
|
||||
|
@ -626,5 +631,6 @@ add-zsh-hook preexec mzc_termsupport_preexec
|
|||
# Optionally source the user's customized .zshrc
|
||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshrc.local" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshrc.local" || return 0
|
||||
|
||||
# vim:fdm=marker:fmr=>>>,<<<:et:ft=zsh:sw=3
|
||||
# filetype is sh for language server
|
||||
# vim:fdm=marker:fmr=>>>,<<<:et:ft=sh:sw=3
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue