aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHsieh Chin Fan <typebrook@topo.tw>2022-12-19 00:19:20 +0800
committerHsieh Chin Fan <typebrook@topo.tw>2022-12-19 00:19:20 +0800
commit77c1e319dfa71a38ad31e33fb0fc50da49ed952f (patch)
tree191806e7a3addb9d5641c966f8db041f6c68d9e1
parent61ca7a63deef169d78ab5b0076a8796ec06bb9e3 (diff)
Update
-rw-r--r--alias4
1 files changed, 2 insertions, 2 deletions
diff --git a/alias b/alias
index 6794c2c..dadbe5e 100644
--- a/alias
+++ b/alias
@@ -205,12 +205,12 @@ vp() {
205 vim $@ "$post" 205 vim $@ "$post"
206 else 206 else
207 # Copy from vps 207 # Copy from vps
208 tmpfile=$(mktemp) 208 tmpfile=$(mktemp --suffix .md)
209 scp vps:"$post" $tmpfile 209 scp vps:"$post" $tmpfile
210 210
211 # Edit locally 211 # Edit locally
212 vim $tmpfile --cmd "autocmd BufWritePost $tmpfile silent! :!setsid scp % vps:$post &" && \ 212 vim $tmpfile --cmd "autocmd BufWritePost $tmpfile silent! :!setsid scp % vps:$post &" && \
213 scp $tmpfile vps:"$post" && \ 213 cat $tmpfile | ssh vps "cd ~/blog && cat >$post && git add $post && git commit -m 'update'" && \
214 rm $tmpfile 214 rm $tmpfile
215 fi 215 fi
216} 216}