Kaynağa Gözat

[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
Chet Gurevitch 6 yıl önce
ebeveyn
işleme
9eaba9a3a3
2 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 1 1
      init.zsh
  2. 2 2
      modules/meta/functions/zmanage

+ 1 - 1
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

+ 2 - 2
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}
                ;;