prezto
prezto copied to clipboard
Update correctly keeping the changes.
Actually to update prezto I have to execute this: git pull && git submodule update --init --recursive
in $HOME.zprezto
but the configuration files like .zshrc
, .zpreztorc
,... point to that folder and this prevents the update. I think it's necessary an update script that does the update correctly keeping the user changes.
Does it still fail if you hardlink instead of symlink those files?
The problem isn't the link type. The problem is that within the git folder there are configuration files susceptible to be modified by the user. These files should be outside of that folder. Something similar to oh-my-zsh system.
👍 for having an additional loaded config file, that is user editable and that will not get overwritten by the user.
This have happened to me twice now, since i forget doing a hardcopy of the file.
Stash, update, pop like Homebrew is better.
Can you explain why it is better? I don't really see the problem or loading an additional file if it exists.
If I execute stash
I lost my changes.
README.md says:
.... Prezto has one user-local configuration file. ....
This isn't true because all ZSH user-local configuration files are in .zprezto folder and they are modified by prezto
installation:
$ ls -la
....
lrwxrwxrwx 1 root root 29 ago 6 2015 .zlogin -> /root/.zprezto/runcoms/zlogin
lrwxrwxrwx 1 root root 30 ago 6 2015 .zlogout -> /root/.zprezto/runcoms/zlogout
lrwxrwxrwx 1 root root 32 ago 6 2015 .zpreztorc -> /root/.zprezto/runcoms/zpreztorc
lrwxrwxrwx 1 root root 31 ago 6 2015 .zprofile -> /root/.zprezto/runcoms/zprofile
lrwxrwxrwx 1 root root 29 ago 6 2015 .zshenv -> /root/.zprezto/runcoms/zshenv
lrwxrwxrwx 1 root root 28 ago 6 2015 .zshrc -> /root/.zprezto/runcoms/zshrc
....
The best solution is include new configuration files with a custom name and source them into their ZSH respective files. For example:
$ tail -n 3 /root/.zprezto/runcoms/zshrc
....
if [[ -r "${ZDOTDIR:-$HOME}/.myzshrc" ]]; then
source "${ZDOTDIR:-$HOME}/.myzshrc"
fi
@simonbcn that seems to be a good approach to me. Instead of having personal custom config files in "${ZDOTDIR:-$HOME}/"
, it would be better to have a directory within ~/.zprezto
for personal configuration, such as, ~/.zprezto/private/
(gitignored) which can be managed using scm if a user prefers to keep track of changes.
There's been some discussion on this in #1346
Typically for update i use
git pull --rebase --autostash
Never had any issues
+1 @rakkesh