[ZSH] Reload zsh on dotfiles update
This commit is contained in:
@@ -29,6 +29,7 @@ update_dotfiles() {
|
|||||||
cd ~/dotfiles || return
|
cd ~/dotfiles || return
|
||||||
if git fetch --dry-run 2>&1 | grep -q .; then
|
if git fetch --dry-run 2>&1 | grep -q .; then
|
||||||
git pull > /dev/null 2>&1
|
git pull > /dev/null 2>&1
|
||||||
|
echo "Updating ($$)" >> /tmp/zsh.log
|
||||||
DOTFILES_UPDATED=1
|
DOTFILES_UPDATED=1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -42,7 +43,7 @@ if [ "$shared_config" -eq 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# If the dotfiles were updated, we are sourcing this file again
|
# If the dotfiles were updated, we are sourcing this file again
|
||||||
if [ "$DOTFILES_UPDATED" -eq "1" ]; then
|
if [ "$DOTFILES_UPDATED" -eq 1 ]; then
|
||||||
echo "Reloading ($$)!" >> /tmp/zsh.log
|
echo "Reloading ($$)!" >> /tmp/zsh.log
|
||||||
source ~/dotfiles/zsh/.zshrc
|
source ~/dotfiles/zsh/.zshrc
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user