aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--alias2
-rwxr-xr-xtools/init/sync.sh3
2 files changed, 4 insertions, 1 deletions
diff --git a/alias b/alias
index 28050a5..2e080a9 100644
--- a/alias
+++ b/alias
@@ -249,7 +249,7 @@ cdss() {
249# about vimwiki 249# about vimwiki
250alias cdw='cd ~/vimwiki' 250alias cdw='cd ~/vimwiki'
251alias chw='tig -C ~/vimwiki' 251alias chw='tig -C ~/vimwiki'
252alias today='vim ~/vimwiki/diary/`date +'%Y-%m-%d'`.md' 252alias today='vim -c Goyo ~/vimwiki/diary/`date +'%Y-%m-%d'`.md'
253alias to='today' 253alias to='today'
254ww() { entry="${1:-guideline}"; vim ~/vimwiki/${entry%%.md}.md; } 254ww() { entry="${1:-guideline}"; vim ~/vimwiki/${entry%%.md}.md; }
255wg() { grep -r "$@" --exclude-dir=logseq/ ~/vimwiki; } 255wg() { grep -r "$@" --exclude-dir=logseq/ ~/vimwiki; }
diff --git a/tools/init/sync.sh b/tools/init/sync.sh
index 04af87e..ebed33a 100755
--- a/tools/init/sync.sh
+++ b/tools/init/sync.sh
@@ -1,5 +1,8 @@
1#!/bin/bash 1#!/bin/bash
2 2
3# If git is working in other process, then don't sync again
4! pidof git && exit 0
5
3# my repo 6# my repo
4sync() { 7sync() {
5 { cd $1 && [[ -n $(git remote -v) ]] || return ; } 2>/dev/null 8 { cd $1 && [[ -n $(git remote -v) ]] || return ; } 2>/dev/null