From 01ad8f1b7d6e8fd301c4a1657632b49650c6e785 Mon Sep 17 00:00:00 2001 From: Jon Morehouse Date: Sun, 19 Jan 2014 16:48:48 -0800 Subject: [PATCH] Build out libignore functionality. Add file names to custom/libignore so they will not be loaded on .oh-my-zsh sourcing --- oh-my-zsh.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 2ae07668c..3cb088090 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -8,10 +8,23 @@ fi # add a function path fpath=($ZSH/functions $ZSH/completions $fpath) -# Load all of the config files in ~/oh-my-zsh that end in .zsh +# grab libignores per user's libignore file +libignores=() +if [ -f $ZSH/custom/libignore ] +then + for line in `cat $ZSH/custom/libignore` + do + libignores+=($ZSH/lib/$line) + done +fi + +# Load all of the config files in ~/oh-my-zsh that end in .zsh which are not flagged to be ignored # TIP: Add files you don't want in git to .gitignore for config_file ($ZSH/lib/*.zsh); do +if [[ ! -n ${libignores[(r)$config_file]} ]] +then source $config_file +fi done # Set ZSH_CUSTOM to the path where your custom config files