custom-omz-plugins

命令行+编辑器 的使用受雷哥影响, 感谢指导. ref: REPO

今天整理了一下常用的git相关的helper-functions, 原本是放在notebook的某个目录里, 每增加一个, 就去 $HOME/.zshrc里source一下

虽然脚本很好用, 但是每次去修改$HOME/.zshrc太蛋疼了

Old way

1
2
3
4
5
source $HOME/Documents/notebook/learn/git/custom_git_scripts.sh
source $HOME/Documents/notebook/learn/git/git.open.web.commit.page.sh
source $HOME/Documents/notebook/learn/git/git-clone-and-cd-into.sh
source $HOME/Documents/notebook/learn/git/git.dfff.enhance.sh
source $HOME/Documents/notebook/learn/git/git.open.repo.in.browser.sh

使用oh-my-zsh的插件功能, 结合github管理这些插件 欢迎拿去用

Better way

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
cd $HOME/.oh-my-zsh/custom/plugins/
git init
git add .; git commit -am 'Init';
git remote add origin git@github.com:liijunwei/custom-omz-plugins.git
git push

# Add plugin in $HOME/.zshrc
plugins=(
git
gitfast
zsh_reload
zsh-autosuggestions
git-auto-fetch
demo # hey there
git-ljw # and there
)

source $HOME/.zshrc

And… enjoy your custom functions~

Thought

做正确的事, 找到最佳实践, 并且遵守最佳实践.

Your life will be a lot easier