From 1babd0fb0631f77f84f0a653cc72b4f2c1a7da57 Mon Sep 17 00:00:00 2001 From: pztrn Date: Sat, 21 Mar 2015 19:53:54 +0500 Subject: [PATCH] More fixes to importing stuff - find will return full file paths. --- zsh/01-config.zsh | 2 +- zsh/10-exports.zsh | 6 +++--- zsh/50-aliases.zsh | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/zsh/01-config.zsh b/zsh/01-config.zsh index 3a3e7ff..8802e0d 100644 --- a/zsh/01-config.zsh +++ b/zsh/01-config.zsh @@ -6,5 +6,5 @@ if [ ! -d ${HOME}/.zsh-config.d/ ]; then fi for file in `find ${HOME}/.zsh-config.d/ -type f -depth 1 | sort`; do - source ${HOME}/.zsh-config.d/${file} + source ${file} done diff --git a/zsh/10-exports.zsh b/zsh/10-exports.zsh index 153c70c..4cbaf89 100644 --- a/zsh/10-exports.zsh +++ b/zsh/10-exports.zsh @@ -1,13 +1,13 @@ # Some default exports. They could be based on configuration variables. for config_file in `find ${CONFIG_PATH}/zsh/exports -type f | sort`; do - source ${CONFIG_PATH}/zsh/exports/${config_file} + source ${config_file} done # We should import user-specific exports and use them. if [ -d ${HOME}/.zsh-config.d/exports ]; then for config_file in `find ${HOME}/.zsh-config.d/exports -type f | sort`; do - if [ -f ${HOME}/.zsh-config.d/exports/${config_file} ]; then - source ${HOME}/.zsh-config.d/exports/${config_file} + if [ -f ${config_file} ]; then + source ${config_file} fi done fi diff --git a/zsh/50-aliases.zsh b/zsh/50-aliases.zsh index d0ed3f3..41db520 100644 --- a/zsh/50-aliases.zsh +++ b/zsh/50-aliases.zsh @@ -8,13 +8,13 @@ alias clocksync="sudo ntpdate 0.pool.ntp.org" alias got="git" for item in `find ${CONFIG_PATH}/zsh/aliases -type f | sort`; do - source ${CONFIG_PATH}/zsh/aliases/${item} + source ${item} done if [ -d "${HOME}/.zsh-config.d/aliases" ]; then for item in `find ${HOME}/.zsh-config.d/aliases -type f | sort`; do - if [ -f ${HOME}/.zsh-config.d/aliases/${item} ]; then - source ${HOME}/.zsh-config.d/aliases/${item} + if [ -f ${item} ]; then + source ${item} fi done fi