use git submodules

This commit is contained in:
Dmytro Meleshko 2018-08-23 14:41:13 +02:00
parent 0d5c7c6e07
commit d7810496d8
6 changed files with 12 additions and 6 deletions

6
.gitmodules vendored Normal file
View file

@ -0,0 +1,6 @@
[submodule "oh-my-zsh"]
path = oh-my-zsh
url = https://github.com/robbyrussell/oh-my-zsh.git
[submodule "zsh-syntax-highlighting"]
path = zsh-syntax-highlighting
url = https://github.com/zsh-users/zsh-syntax-highlighting.git

View file

@ -12,6 +12,5 @@ cat > $ZSHRC <<EOF
#!/usr/bin/env zsh
export DOTFILES_PATH="\$HOME/.dotfiles"
export OH_MY_ZSH_PATH="\$HOME/.oh-my-zsh"
source "\$DOTFILES_PATH/zshrc"
EOF

View file

@ -1,7 +1,7 @@
#!/usr/bin/env zsh
configure_oh_my_zsh() {
export ZSH="$OH_MY_ZSH_PATH"
export ZSH="$DOTFILES_PATH/oh-my-zsh"
# see https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
export ZSH_THEME="agnoster"

1
oh-my-zsh Submodule

@ -0,0 +1 @@
Subproject commit abca62add1a6d0ac34e697beac8682076d5c1dd7

@ -0,0 +1 @@
Subproject commit db6cac391bee957c20ff3175b2f03c4817253e60

7
zshrc
View file

@ -1,11 +1,11 @@
#!/usr/bin/env zsh
if [[ -n "$DOTFILES_PATH" && -n "$OH_MY_ZSH_PATH" ]]; then
if [[ -n "$DOTFILES_PATH" ]]; then
for script in functions path exports aliases oh-my-zsh widgets; do
source "$DOTFILES_PATH/lib/$script.zsh"
done
source_if_exists "$ZSH/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh"
source "$DOTFILES_PATH/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh"
run_before rbenv 'eval "$(rbenv init -)"'
run_before sdk 'source_if_exists "$SDKMAN_DIR/bin/sdkman-init.sh"'
@ -13,6 +13,5 @@ if [[ -n "$DOTFILES_PATH" && -n "$OH_MY_ZSH_PATH" ]]; then
python "$DOTFILES_PATH/welcome/main.py"
else
[[ -z "$DOTFILES_PATH" ]] && echo "please, set DOTFILES_PATH to the path to your dotfiles directory" >&2
[[ -z "$OH_MY_ZSH_PATH" ]] && echo "please, set OH_MY_ZSH_PATH to the path to your Oh My Zsh directory" >&2
echo "please, set DOTFILES_PATH to the path to your dotfiles directory" >&2
fi