Created
February 20, 2024 14:38
-
-
Save ErnestoCobos/16204ecd7dbd1ffb5c4e42c693182c63 to your computer and use it in GitHub Desktop.
The idea is to show here the configuration fragment that is used in .zshrc (mac) for the configuration of the script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ############################################## | |
# ## DYNAMIC GIT CONFIGURATOR FOR ZSH SHELL ## | |
# ## Automates Git configuration on-the-fly ## | |
# ## based on the current working directory ## | |
# ## and user-defined scripts. ## | |
# ############################################## | |
# ## - Auto-loads with Zsh | |
# ## - Hooks into directory change events | |
# ## - Executes Git configuration scripts | |
# ## - Allows manual addition of Git configs | |
# ############################################## | |
source ~/ToolBox/Scripts/DynamicGitConfigurator.sh/DynamicGitConfigurator.sh | |
autoload -U add-zsh-hook | |
add-zsh-hook chpwd _execute_git_configurator | |
_execute_git_configurator() { | |
~/ToolBox/Scripts/DynamicGitConfigurator.sh/DynamicGitConfigurator.sh | |
} | |
function addGitConfig() { | |
~/ToolBox/Scripts/DynamicGitConfigurator.sh/addGitConfig.sh | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment