aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHsieh Chin Fan <typebrook@gmail.com>2022-04-03 20:16:18 +0800
committerHsieh Chin Fan <typebrook@gmail.com>2022-04-03 20:16:18 +0800
commit9dd24ffd51f0ffe2a48474dc7a2bd5f50f978b5d (patch)
treec2b6cb06a5b2cdbb8702d50da0dc1a02be32c1b0
parente892b3a63f95527b2b3b038f3c9b61400efae0af (diff)
update
-rw-r--r--alias4
-rw-r--r--zsh/_vp.sh2
2 files changed, 3 insertions, 3 deletions
diff --git a/alias b/alias
index c59f317..9cd58e0 100644
--- a/alias
+++ b/alias
@@ -151,8 +151,8 @@ alias cdmd='cd ~/git/map/deploy'
151# blog 151# blog
152alias cdb='cd ~/blog' 152alias cdb='cd ~/blog'
153vp() { 153vp() {
154 post=$1 && shift 154 post="$(find ~/blog/content -name "$1")" && shift
155 vim $@ ~/blog/content/posts/$post 155 vim $@ $post
156} 156}
157 157
158# git 158# git
diff --git a/zsh/_vp.sh b/zsh/_vp.sh
index a740c0b..f611fc9 100644
--- a/zsh/_vp.sh
+++ b/zsh/_vp.sh
@@ -1,7 +1,7 @@
1#compdef vp 1#compdef vp
2 2
3function _vp() { 3function _vp() {
4 compadd -S '' $(cd ~/blog/content/posts && ls ${words[2]}*) 4 compadd -S '' $(find ~/blog/content -name '*.md' | grep -o '[^/]*$')
5} 5}
6 6
7_vp 7_vp