-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
45 lines (38 loc) · 1.14 KB
/
zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
source ~/.zsh/aliases.sh
source ~/.zsh/settings.sh
DEFAULT_USER='yuanyuanliu'
function clone {
url=$1;
reponame=$(echo $url | awk -F/ '{print $NF}' | sed -e 's/.git$//');
git clone $url $reponame;
cd $reponame;
cp ~/dotfiles/git/gitignore .gitignore;
cp ~/dotfiles/git/pre-commit-config.yaml .pre-commit-config.yaml;
}
# User configuration
source "${HOME}/.zgen/zgen.zsh"
# if the init scipt doesn't exist
if ! zgen saved; then
echo "Creating a zgen save"
zgen oh-my-zsh
#plugins
zgen oh-my-zsh plugins/command-not-found
zgen load zsh-users/zsh-syntax-highlighting
zgen load zsh-users/browse-commit
zgen load zsh-users/alias-tips
zgen load Tarrasch/zsh-autoenv
zgen load zsh-users/zsh-autosuggestions
# bulk load
zgen loadall <<EOPLUGINS
zsh-users/zsh-history-substring-search
EOPLUGINS
# completions
zgen load zsh-users/zsh-completions src
# theme
zgen oh-my-zsh themes/agnoster
# save all to init script
zgen save
fi
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh