From 5bdc4ece37e29c8d83a803035dbc903adf599ba9 Mon Sep 17 00:00:00 2001 From: pztrn Date: Sat, 21 Mar 2015 16:32:25 +0500 Subject: [PATCH] This should fix problems with sourcing things from home directory and warnings, that appear on FreeBSD. --- zsh/10-exports.zsh | 4 +++- zsh/50-aliases.zsh | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/zsh/10-exports.zsh b/zsh/10-exports.zsh index d16dd61..aca593f 100644 --- a/zsh/10-exports.zsh +++ b/zsh/10-exports.zsh @@ -3,6 +3,8 @@ for config_file in `ls ${CONFIG_PATH}/zsh/exports | sort`; do done for config_file in `ls ${HOME}/.zsh-config.d/exports | sort`; do - source ${HOME}/.zsh-config.d/exports/${config_file} + if [ -f ${HOME}/.zsh-config.d/exports/${config_file} ]; then + source ${HOME}/.zsh-config.d/exports/${config_file} + fi done diff --git a/zsh/50-aliases.zsh b/zsh/50-aliases.zsh index 2a4aac3..2b27293 100644 --- a/zsh/50-aliases.zsh +++ b/zsh/50-aliases.zsh @@ -13,6 +13,8 @@ done if [ -d "${HOME}/.zsh-config.d/aliases" ]; then for item in `ls ${HOME}/.zsh-config.d/aliases`; do - source ${HOME}/.zsh-config.d/aliases/${item} + if [ -f ${HOME}/.zsh-config.d/aliases/${item} ]; then + source ${HOME}/.zsh-config.d/aliases/${item} + fi done fi