From 02063b266bf126179505e45c7a70ae01057569a2 Mon Sep 17 00:00:00 2001 From: Akelge Date: Sat, 30 Aug 2014 18:50:49 +0000 Subject: [PATCH] Made it work even from ~/.zsh --- zsh/zshrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zsh/zshrc b/zsh/zshrc index 10298e1..d3eab43 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -8,9 +8,11 @@ # # Determine zsh conf file position. On Debian/Ubuntu is /etc/zsh, on other should be /etc - +# [ -d /etc/zsh ] && BASE="/etc/zsh" || BASE="/etc" +[ -d ~/.zsh ] && BASE=~/.zsh + KERNEL=`uname -s` LIBRARY=${BASE}/zsh.d KERNLIB=${LIBRARY}/${KERNEL} @@ -27,7 +29,8 @@ function loadRC { fi # Add local customization file, svn ignored - if [ $EUID -eq 0 ]; then + # if [ $EUID -eq 0 ]; then + if [ -w $1 ]; then [ -f $1/99-local.zsh ] || echo "# Local customizations" > $1/99-local.zsh fi