From 0f5ceab00a5a30e3a211017c34937aa3fee1c3a4 Mon Sep 17 00:00:00 2001 From: Matt Hamilton Date: Tue, 29 Dec 2015 10:09:50 -0500 Subject: [PATCH] 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. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9acb0e6..93543bd 100644 --- a/README.md +++ b/README.md @@ -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 ```