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:
Matt Hamilton 2015-12-29 10:09:50 -05:00
parent 641ade3fbd
commit 0f5ceab00a
1 changed files with 2 additions and 1 deletions

View File

@ -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
```