-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
easy way for prezto customization #1535
Comments
There is plenty of room to config prezto in the files already provided for startup, it’s just a matter to place your overrides in the appropriate place. most of them should probably go in (For our new users, the notation if [[ -n $ZDOTDIR ]]; then
DOTFILES_PATH=$ZDOTDIR
else
DOTFILES_PATH=$HOME
fi
source $DOTFILES_PATH/.zshenv
#pro tip! set $ZDOTDIR on /etc/zshenv to ~/.zconf to have all runcoms live there instead of cluttering ~ =) Also, any tweaks to prezto’s behavior should go after invoking zprezto init in zshrc or, in Also, note that another difference between interactive login shells and plain interactive shells, is that, besides sourcing #Pro tip: configure your window manager to call zsh -ls for terminals.
#Example using i3wm on ubuntu:
#i3wm.conf:
...
set $XTERM_CMD='xterm -e zsh -ls`
bind $mod+x $XTERM_CMD
... Why is that? because login shells are assumed to be the main point of interaction with a possibly human user (the truth is out there) while non login shells would be spawned as sub-shells of a login shell , when executing scripts that call When launching a new terminal within an X11 session, it is safe to assume that you are already logged in so any terminal emulator will launch an interactive-non-login shell. Which is, per specification the correct behavior, but not the behavior most users expect. There is a reason for this specified behaviour: The advantage of grouping all interaction oriented settings in Finally, it is a common source of frustration amongst graphical environment users, to spend some time adding their customizations to This can be solved by calling (or aliasing) your terminal emulator with the required option to invoke a login shell, for
if you want to replace your non-login shell on your emulator with a brand-new shiny login shell you can issue
The opposite mistake is to tack-on all interactive customizations on here is a summary of the startup file and their intended purpose, as well as when are they executed:
you may be thinking... why is TL;DRuse your .zshrc after zprezto has been invoked, or before to remove or activate packages via or use .zshlogin to override or tweak zprezto behavior. there is also In any case, this question is often brought up by users that use the distributed runcoms as is which is a terrible idea, since doing |
I forgot to mention that by default, on stock Personally, i find that debian-derived Linux distributions set up a bunch of un-needed stuff and indirections (hey, i'm a plain BSD guy since puberty). Some of it is nice, like the additional So short-circuit the nonsense by copying the good stuff from i don't reccomend this unles you really know what you're doing, you may end up with an unusable configuration. |
If I understand the upgrade process correctly, I am supposed to fork this project then deal with merge conflicts every time I update??? That's insane! Once I set my configuration I expect updates to just work like they do in all other programs. Why can't runcoms do their thing and then source local files like
And in my
Because Point is every configuration should be overridable from standard zsh files in locations which must be showed in README.md and these locations should not change over time. Example of such location could be That way I can pull this repo on every commit and never have any merge conflicts because my settings override prezto's without any performance penalty. |
I personally agree with you @marko-avlijas - this is why I don't use the standard method of loading prezto. There's an example here: https://github.com/belak/dotfiles/blob/5febcfcdb6364db2216145e06c13184ffacb8894/zshrc I view the provided runcoms as a starting point. The "official" method of managing them is simply a suggestion. It may be worth looking into an official way for simple customization of runcoms, but for now I'd just recommend managing them yourself outside the prezto repo - they're not very complicated. Additionally, most prezto settings can be set in a .zpreztorc file - this is enough for most people. |
git pull
is great, but maybe add workflow for more easy prezto customization, like add in .zshrc:The text was updated successfully, but these errors were encountered: