From 2e4a053c8c5bde6d11313a9232758dcb8d1e5771 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 28 Jul 2011 17:06:45 -0400 Subject: [PATCH] Source functions in the order needed. --- README.md | 4 ++-- functions/init.zsh | 12 ++++++++++++ oh-my-zsh.zsh | 6 ++---- 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 functions/init.zsh diff --git a/README.md b/README.md index c22982a..38d65e9 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,8 @@ minimum recommended version is 4.3.9. ### Problems? If you are not able to find certain commands after switching to *Oh My ZSH*, you need -to modify `PATH` in `~/.zshrc`, or better yet, in `~/functions/environment.zsh` (may -be subject to merge conflicts). +to modify `PATH` in `~/.zshrc`, or better yet, in `~/functions/02.environment.zsh` +(may be subject to merge conflicts). ## Usage diff --git a/functions/init.zsh b/functions/init.zsh new file mode 100644 index 0000000..0c7765d --- /dev/null +++ b/functions/init.zsh @@ -0,0 +1,12 @@ +# Source function files (the order matters). +source "${0:h}/helper.zsh" +source "${0:h}/environment.zsh" +source "${0:h}/terminal.zsh" +source "${0:h}/keyboard.zsh" +source "${0:h}/completion.zsh" +source "${0:h}/history.zsh" +source "${0:h}/directory.zsh" +source "${0:h}/alias.zsh" +source "${0:h}/spectrum.zsh" +source "${0:h}/utility.zsh" + diff --git a/oh-my-zsh.zsh b/oh-my-zsh.zsh index f063a1d..965bb90 100644 --- a/oh-my-zsh.zsh +++ b/oh-my-zsh.zsh @@ -11,10 +11,8 @@ fpath=($OMZ/themes/*(/) $OMZ/plugins/${^plugins} $OMZ/functions $fpath) # Load and initialize the completion system. autoload -Uz compinit && compinit -i -# Load all files in $OMZ/oh-my-zsh/lib/ that end in .zsh. -for function_file in $OMZ/functions/*.zsh; do - source "$function_file" -done +# Source function files. +source "$OMZ/functions/init.zsh" # Load all plugins defined in ~/.zshrc. for plugin in $plugins; do