diff options
| -rw-r--r-- | alias | 8 | ||||
| -rw-r--r-- | zsh/_vp.sh | 7 |
2 files changed, 14 insertions, 1 deletions
| @@ -142,9 +142,15 @@ alias cdD='cd ~/Documents' | |||
| 142 | alias cdP='cd ~/Pictures' | 142 | alias cdP='cd ~/Pictures' |
| 143 | alias cdpu='cd ~/public' | 143 | alias cdpu='cd ~/public' |
| 144 | alias cdV='cd ~/Videos' | 144 | alias cdV='cd ~/Videos' |
| 145 | alias cdb='cd ~/blog' | ||
| 146 | alias cdmd='cd ~/git/map/deploy' | 145 | alias cdmd='cd ~/git/map/deploy' |
| 147 | 146 | ||
| 147 | # blog | ||
| 148 | alias cdb='cd ~/blog' | ||
| 149 | vp() { | ||
| 150 | post=$1 && shift | ||
| 151 | vim $@ ~/blog/content/posts/$post | ||
| 152 | } | ||
| 153 | |||
| 148 | # git | 154 | # git |
| 149 | unalias gc &> /dev/null # override zsh plugin alias | 155 | unalias gc &> /dev/null # override zsh plugin alias |
| 150 | gc() { | 156 | gc() { |
diff --git a/zsh/_vp.sh b/zsh/_vp.sh new file mode 100644 index 0000000..a740c0b --- /dev/null +++ b/zsh/_vp.sh | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #compdef vp | ||
| 2 | |||
| 3 | function _vp() { | ||
| 4 | compadd -S '' $(cd ~/blog/content/posts && ls ${words[2]}*) | ||
| 5 | } | ||
| 6 | |||
| 7 | _vp | ||