Browse code

Moved ZSH_CUSTOM declaration before fpath is set

* also normalized style to match the guide.

Christian HoĢˆltje authored on 16/11/2011 at 14:46:05
Showing 1 changed files
... ...
@@ -13,6 +13,12 @@ fpath=($ZSH/functions $ZSH/completions $fpath)
13 13
 # TIP: Add files you don't want in git to .gitignore
14 14
 for config_file ($ZSH/lib/*.zsh) source $config_file
15 15
 
16
+# Set ZSH_CUSTOM to the path where your custom config files
17
+# and plugins exists, or else we will use the default custom/
18
+if [[ -z "$ZSH_CUSTOM" ]]; then
19
+    ZSH_CUSTOM="$ZSH/custom"
20
+fi
21
+
16 22
 # Add all defined plugins to fpath. This must be done
17 23
 # before running compinit.
18 24
 plugin=${plugin:=()}
... ...
@@ -28,12 +34,6 @@ done
28 28
 autoload -U compinit
29 29
 compinit -i
30 30
 
31
-# Set ZSH_CUSTOM to the path where your custom config files
32
-# and plugins exists, or else we will use the default custom/
33
-if [ "$ZSH_CUSTOM" = ""  ]
34
-then
35
-    ZSH_CUSTOM="$ZSH/custom"
36
-fi
37 31
 
38 32
 # Load all of the plugins that were defined in ~/.zshrc
39 33
 for plugin ($plugins); do