robbyrussell/oh-my-zsh — pull request #1369 by AnthonyDiGirolamo (2012-10-21 04:12:16+00:00)
Title: Allow custom/*.zsh configs to override lib/*.zsh files of the same name.

This lets you replace default oh-my-zsh behavior with settings more to your
liking. You can still add on to default oh-my-zsh settings by adding them to
`~/.zshrc` or directly to the `lib/*.zsh` files.

The README was a bit confusing regarding this. The first line in the
customization section says: "If you want to override any of the default
behavior, just add a new file (ending in .zsh) into the custom/ directory."

When I tried this I found that the `custom/*.zsh` files would get sourced in
addition to the defaults under `lib/` but not instead of. For example, I wanted
to remove all the aliases setup in `lib/directories.zsh` so I created
`custom/directories.zsh` containing only:

# Changing/making/removing directory
setopt auto_name_dirs
setopt auto_pushd
setopt pushd_ignore_dups

It turns out this file is sourced but `lib/directires.zsh` is also sourced so the
aliases within are still created.

This change will source the `custom/*.zsh` files in place of their brethren in `lib/*.zsh`

This pull request replaces (#1364)