aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/zsh/.zshrc28
1 files changed, 0 insertions, 28 deletions
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc
index 912a51c..e27e0bf 100644
--- a/.config/zsh/.zshrc
+++ b/.config/zsh/.zshrc
@@ -368,36 +368,8 @@ extract () {
### Dotfiles
-# Set up the dotfiles repository and alias
alias config='git --git-dir=$HOME/.cfg --work-tree=$HOME'
-# Function to set up Git environment variables
-function set_git_env() {
- local cwd="$PWD"
- while [[ "$cwd" != "/" ]]; do
- if [[ -d "$cwd/.git" ]]; then
- unset GIT_DIR
- unset GIT_WORK_TREE
- return
- fi
- cwd=$(dirname "$cwd")
- done
- export GIT_DIR="$HOME/.cfg"
- export GIT_WORK_TREE="$HOME"
-}
-
-# Set up Git environment variables on initial shell startup
-set_git_env
-
-# Function to set up Git environment variables whenever you execute a command
-function preexec() {
- set_git_env
-}
-
-# Enable the preexec function
-autoload -Uz add-zsh-hook
-add-zsh-hook preexec preexec
-
#alias cfg='config subtree pull --prefx'
#alias gsp="git subtree push --prefix=_site git@github.com:mertnuhoglu/blog_datascience.git"