From 20a4e5b6acc0191ebafc74c6504d6bf133aa903c Mon Sep 17 00:00:00 2001 From: Noah Masur Date: Sun, 2 Aug 2020 10:28:55 -0400 Subject: [PATCH] add syncnotes git automation --- fish.configlink/fish_variables | 1 + fish.configlink/functions/notes.fish | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/fish.configlink/fish_variables b/fish.configlink/fish_variables index be197c2..25aa9f6 100644 --- a/fish.configlink/fish_variables +++ b/fish.configlink/fish_variables @@ -42,6 +42,7 @@ SETUVAR _fish_abbr_pods:kubectl\x20get\x20pods\x20\x2dA SETUVAR _fish_abbr_public_2D_key:ssh\x2dkeygen\x20\x2dy\x20\x2df\x20\x7e/\x2essh/id_rsa\x20\x3e\x20\x7e/\x2essh/id_rsa\x2epub SETUVAR _fish_abbr_py:python SETUVAR _fish_abbr_runbootstrap:\x24DOTS/scripts/bootstrap +SETUVAR _fish_abbr_sn:syncnotes SETUVAR _fish_abbr_sshc:vim\x20\x7e/\x2essh/config SETUVAR _fish_abbr_ssl:openssl\x20req\x20\x2dnew\x20\x2dnewkey\x20rsa\x3a2048\x20\x2dnodes\x20\x2dkeyout\x20server\x2ekey\x20\x2dout\x20server\x2ecsr SETUVAR _fish_abbr_te:terraform diff --git a/fish.configlink/functions/notes.fish b/fish.configlink/functions/notes.fish index 9b08b9c..8ea59b2 100644 --- a/fish.configlink/functions/notes.fish +++ b/fish.configlink/functions/notes.fish @@ -46,4 +46,14 @@ function notes --description "Notes functions" vim ~/Documents/notes/$argv[1].md end + abbr -a sn 'syncnotes' + function syncnotes --description "Full git commit on notes" + cd $HOME/Documents/notes + git pull + git add -A + git commit -m "autosync" + git push + cd - + end + end