ea3e666e04bfae31b37ef42dfe54801484341e46

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

init: run compinit before loading lib/ files

Diff

 1diff --git a/lib/directories.zsh b/lib/directories.zsh
 2index 355c442d24f0918d8149e917e380fcb7b4873613..cf87bd7e4f7028d29746c9b806738eeba1d29065 100644
 3--- a/lib/directories.zsh
 4+++ b/lib/directories.zsh
 5@@ -21,6 +21,7 @@ alias 9='cd -9'
 6 
 7 alias md='mkdir -p'
 8 alias rd=rmdir
 9+
10 function d () {
11   if [[ -n $1 ]]; then
12     dirs "$@"
13diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
14index b1460b1d711888d7249e00abf6b5cee70b7d1606..6b2662d5e8fdde23ad91d0557c43baff1206a5c1 100644
15--- a/oh-my-zsh.sh
16+++ b/oh-my-zsh.sh
17@@ -29,15 +29,6 @@ if [[ -z "$ZSH_CUSTOM" ]]; then
18 fi
19 
20 
21-# Load all of the config files in ~/oh-my-zsh that end in .zsh
22-# TIP: Add files you don't want in git to .gitignore
23-for config_file ($ZSH/lib/*.zsh); do
24-  custom_config_file="${ZSH_CUSTOM}/lib/${config_file:t}"
25-  [ -f "${custom_config_file}" ] && config_file=${custom_config_file}
26-  source $config_file
27-done
28-
29-
30 is_plugin() {
31   local base_dir=$1
32   local name=$2
33@@ -71,6 +62,7 @@ if [ -z "$ZSH_COMPDUMP" ]; then
34 fi
35 
36 if [[ $ZSH_DISABLE_COMPFIX != true ]]; then
37+  source $ZSH/lib/compfix.zsh
38   # If completion insecurities exist, warn the user
39   handle_completion_insecurities
40   # Load only from secure directories
41@@ -80,6 +72,15 @@ else
42   compinit -u -C -d "${ZSH_COMPDUMP}"
43 fi
44 
45+
46+# Load all of the config files in ~/oh-my-zsh that end in .zsh
47+# TIP: Add files you don't want in git to .gitignore
48+for config_file ($ZSH/lib/*.zsh); do
49+  custom_config_file="${ZSH_CUSTOM}/lib/${config_file:t}"
50+  [ -f "${custom_config_file}" ] && config_file=${custom_config_file}
51+  source $config_file
52+done
53+
54 # Load all of the plugins that were defined in ~/.zshrc
55 for plugin ($plugins); do
56   if [ -f $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh ]; then