-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Break up Zsh configuration files #265
base: master
Are you sure you want to change the base?
Conversation
Using `$ZSH` for the project root directory conflicts with zsh projects and plugins (e.g., oh-my-zsh). Change `$ZSH` -> `$DOTFILES`. WIP: #8/b
1. zshenv: path.zsh, env.zsh 2. zprofile: profile.zsh 3. zshrc: *.zsh, completion.zsh 4. zlogin: login.zsh 5. zlogout: logout.zsh WIP: #10
1. zshenv: *path.zsh, *env.zsh, *alias.zsh, *aliases.zsh 2. zprofile: *profile.zsh 3. zshrc: *fpath.zsh, *.zsh, *completion.zsh 4. zlogin: *login.zsh 5. zlogout: *logout.zsh WIP: #10
zsh/zshrc.symlink
Outdated
typeset -U fpath_files interactive_files completion_files | ||
fpath_files=($DOTFILES/**/*fpath.zsh) | ||
interactive_files=($DOTFILES/**/*.zsh~**/*completion.zsh~**/*path.zsh~**/*env.zsh~**/*alias.zsh~**/*aliases.zsh~**/*profile.zsh~**/*login.zsh~**/*logout.zsh) | ||
completion_file=($DOTFILES/**/*completion.zsh) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be completion_files
...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thank you
zsh/zshrc.symlink
Outdated
# all of our non-path/env/profile/login/logout zsh files | ||
typeset -U fpath_files interactive_files completion_files | ||
fpath_files=($DOTFILES/**/*fpath.zsh) | ||
interactive_files=($DOTFILES/**/*.zsh~**/*completion.zsh~**/*path.zsh~**/*env.zsh~**/*alias.zsh~**/*aliases.zsh~**/*profile.zsh~**/*login.zsh~**/*logout.zsh) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe ~**/*aliases.zsh
doesn't belong here. Otherwise aliases defined in zsh/aliases.zsh won't be sourced...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another good catch. Remnants of considering to source alias files in zshenv. Decided it was best to consider aliases as interactive only.
WIP: #10 Review: holman#265
Having read about startup files, according to http://zsh.sourceforge.net/Intro/intro_3.html:
Should we even keep a |
Pros for
|
👍 Thanks for clarifying @defrank, makes sense (I'm still new to zsh). |
Yeah don't worry. I'm no expert either. Thanks for reviewing! |
Another problem I only noticed now: excluding |
I think there's also room for simplification if we were to adopt the suggested naming scheme. All topic |
I think I'd rather just remove the wildcard prefix feature. It is an overcomplication.
This will allow rbenv.zsh to be sourced as an interactive file instead of an environment file. I suspect it was being sourced too early. I will probably also want to rename system/_path.zsh --> system/path.zsh. |
0d7428a
to
051b85c
Compare
--static doesnt exist anymore
Depends on #246
dysfungi#10
Utilize:
**/*path.zsh
(except**/*fpath.zsh
)**/*env.zsh
**/*profile.zsh
**/*fpath.zsh
**/*.zsh
(except**/*completion.zsh
,**/*path.zsh
,**/*env.zsh
,**/*profile.zsh
,**/*login.zsh
,**/*logout.zsh
)**/*completion.zsh
**/*login.zsh
**/*logout.zsh
Benefits
#!/bin/zsh
and are run as cronjobs.