diff options
-rw-r--r-- | alias | 4 | ||||
-rw-r--r-- | zsh/_vp.sh | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -151,8 +151,8 @@ alias cdmd='cd ~/git/map/deploy' | |||
151 | # blog | 151 | # blog |
152 | alias cdb='cd ~/blog' | 152 | alias cdb='cd ~/blog' |
153 | vp() { | 153 | vp() { |
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 |
@@ -1,7 +1,7 @@ | |||
1 | #compdef vp | 1 | #compdef vp |
2 | 2 | ||
3 | function _vp() { | 3 | function _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 |