-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(zsh): Break up Zsh configuration files
1. zshenv: path.zsh, env.zsh 2. zprofile: profile.zsh 3. zshrc: *.zsh, completion.zsh 4. zlogin: login.zsh 5. zlogout: logout.zsh WIP: dysfungi/dotfiles#10
- Loading branch information
Showing
6 changed files
with
91 additions
and
24 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# NOTE: Not intended to be used with zprofile, but can be. | ||
|
||
# Login configs. | ||
setopt nullglob | ||
|
||
# all of our login zsh files | ||
typeset -U login_files | ||
login_files=($DOTFILES/**/login.zsh) | ||
|
||
# run all login files | ||
for file in ${login_files}; do | ||
source "$file" | ||
done | ||
|
||
unset login_files | ||
unsetopt nullglob |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Logout configs. | ||
setopt nullglob | ||
|
||
# all of our logout zsh files | ||
typeset -U logout_files | ||
logout_files=($DOTFILES/**/logout.zsh) | ||
|
||
# run all logout files | ||
for file in ${logout_files}; do | ||
source "$file" | ||
done | ||
|
||
unset logout_files | ||
unsetopt nullglob |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# NOTE: Not intended to be used with zlogin, but can be. | ||
|
||
# Login profile configs. | ||
setopt nullglob | ||
|
||
# all of our profile zsh files | ||
typeset -U profile_files | ||
profile_files=($DOTFILES/**/profile.zsh) | ||
|
||
# run all profile files | ||
for file in ${profile_files}; do | ||
source "$file" | ||
done | ||
|
||
unset profile_files | ||
unsetopt nullglob |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Environment configs. | ||
setopt nullglob | ||
|
||
# shortcut to this dotfiles path is $DOTFILES | ||
export DOTFILES="$HOME/.dotfiles" | ||
|
||
# your project folder that we can `c [tab]` to | ||
export PROJECTS="$HOME/Code" | ||
|
||
# path and env zsh files | ||
typeset -U path_files env_files | ||
path_files=($DOTFILES/**/path.zsh) | ||
env_files=($DOTFILES/**/env.zsh) | ||
|
||
# load the path files | ||
for file in ${path_files}; do | ||
source "$file" | ||
done | ||
|
||
# load the env files | ||
for file in ${env_files}; do | ||
source "$file" | ||
done | ||
|
||
unset path_files env_files | ||
unsetopt nullglob |
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