aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHsieh Chin Fan <typebrook@gmail.com>2022-03-27 09:40:36 +0800
committerHsieh Chin Fan <typebrook@gmail.com>2022-03-27 09:40:36 +0800
commit34f816449453f293fd1f0e26847cfbb0259a3109 (patch)
tree4f1e06b0302fa9bbe9b71ddc27f6e9a1d37f1e0b
parent33f05cf09b40adeb21957fa70ae41ea599204b08 (diff)
update
-rw-r--r--alias8
-rw-r--r--zsh/_vp.sh7
2 files changed, 14 insertions, 1 deletions
diff --git a/alias b/alias
index 530b9b1..e259b63 100644
--- a/alias
+++ b/alias
@@ -142,9 +142,15 @@ alias cdD='cd ~/Documents'
142alias cdP='cd ~/Pictures' 142alias cdP='cd ~/Pictures'
143alias cdpu='cd ~/public' 143alias cdpu='cd ~/public'
144alias cdV='cd ~/Videos' 144alias cdV='cd ~/Videos'
145alias cdb='cd ~/blog'
146alias cdmd='cd ~/git/map/deploy' 145alias cdmd='cd ~/git/map/deploy'
147 146
147# blog
148alias cdb='cd ~/blog'
149vp() {
150 post=$1 && shift
151 vim $@ ~/blog/content/posts/$post
152}
153
148# git 154# git
149unalias gc &> /dev/null # override zsh plugin alias 155unalias gc &> /dev/null # override zsh plugin alias
150gc() { 156gc() {
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
3function _vp() {
4 compadd -S '' $(cd ~/blog/content/posts && ls ${words[2]}*)
5}
6
7_vp