From 9eaba9a3a38eb2928732b4cccbbeb6126fea365b Mon Sep 17 00:00:00 2001 From: Chet Gurevitch Date: Sun, 3 Sep 2017 15:51:46 -0700 Subject: [PATCH] [meta] Use ZIM_HOME in zmanage And fix init.zhs to export ZIM_HOME. The zmanage script invokes a new shell for the sub commands, and those would fail as there would be no value for ZIM_HOME. Closes #203 --- init.zsh | 2 +- modules/meta/functions/zmanage | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/init.zsh b/init.zsh index e692f94..2d87b61 100755 --- a/init.zsh +++ b/init.zsh @@ -9,7 +9,7 @@ if ! is-at-least 5.2; then fi # Define zim location -(( ! ${+ZIM_HOME} )) && ZIM_HOME="${ZDOTDIR:-${HOME}}/.zim" +(( ! ${+ZIM_HOME} )) && export ZIM_HOME="${ZDOTDIR:-${HOME}}/.zim" # Source user configuration if [[ -s "${ZDOTDIR:-${HOME}}/.zimrc" ]]; then diff --git a/modules/meta/functions/zmanage b/modules/meta/functions/zmanage index 42522ee..afb4320 100644 --- a/modules/meta/functions/zmanage +++ b/modules/meta/functions/zmanage @@ -16,7 +16,7 @@ if (( ${#} != 1 )); then fi local tools -tools="${ZIM}/tools" +tools="${ZIM_HOME}/tools" case ${1} in update) zsh ${tools}/zim_update @@ -33,7 +33,7 @@ case ${1} in ;; reset) zsh ${tools}/zim_reset ;; - debug) zsh ${ZIM}/modules/debug/functions/trace-zim + debug) zsh ${ZIM_HOME}/modules/debug/functions/trace-zim ;; *) print ${usage} ;;