From eeaa54993a59063d3364a79028814d04db95fcee Mon Sep 17 00:00:00 2001 From: Konstantin Demin Date: Sun, 21 Mar 2021 22:14:40 +0300 Subject: [PATCH] dotfiles maintenance in subshell --- .config/zsh/lib/selfservice.zsh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.config/zsh/lib/selfservice.zsh b/.config/zsh/lib/selfservice.zsh index 05a3b63..e34cde3 100644 --- a/.config/zsh/lib/selfservice.zsh +++ b/.config/zsh/lib/selfservice.zsh @@ -4,6 +4,13 @@ dotfiles-update() { "${ZSHU[d_zdot]}/.config/dotfiles/install.sh" } +dotfiles-git() { ( + cd "${ZSHU[d_zdot]}/" + export GIT_DIR="${ZSHU[d_zdot]}/.config/dotfiles/repo.git" + export GIT_WORK_TREE="${ZSHU[d_zdot]}" + zsh -i +) } + z-update() { dotfiles-update }