Prepend, don't append to user configs
We want to prepend the initialization of zim to any current user configurations, not append. This way zim doesn't override any manually configured settings in the user's config files.
This commit is contained in:
parent
641ade3fbd
commit
0f5ceab00a
@ -49,7 +49,8 @@ uninstall those first to prevent conflicts.
|
||||
```
|
||||
setopt EXTENDED_GLOB
|
||||
for template_file ( ${ZDOTDIR:-${HOME}}/.zim/templates/* ); do
|
||||
cat ${template_file} | tee -a ${ZDOTDIR:-${HOME}}/.$(basename ${template_file}) > /dev/null
|
||||
user_file="${ZDOTDIR:-${HOME}}/.${${template_file}:t}"
|
||||
print -n "$(<${template_file})\n$(<${user_file})" >! ${user_file}
|
||||
done
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user