blob: eed28fbde9eca21dca4c24f6c5636bd627f29303 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/bin/bash
# A simple script for managing a vimwiki git repo.
# Allows slightly simpler edits and commits.
if [ $# -eq 0 ] || [ $1 = "edit" ]; then
vim +VimwikiIndex
exit
fi
pushd ~/vimwiki/
case $1 in
commit)
shift
if [ $# -eq 0 ]; then
msg="$(date --rfc-email)"
else
msg="$@"
fi
git add -A
git commit -m "$msg"
;;
ammend)
shift
if [ $# -eq 0 ]; then
git commit --amend
else
msg="$@"
git commit --amend -m "$msg"
fi
;;
*)
eval "git $@"
;;
esac
|