mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Build out libignore functionality. Add file names to custom/libignore so they will not be loaded on .oh-my-zsh sourcing
This commit is contained in:
parent
d485044169
commit
01ad8f1b7d
1 changed files with 14 additions and 1 deletions
15
oh-my-zsh.sh
15
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue