Building upon @teknopaul his answer, I added a little hack that ensures the previous aliases get tossed by replacing the current shell with a new bash instance using exec
:
cd () {
builtin cd "$@" && exec bash
}
if [ -f $PWD/.aliases ]; then
. $PWD/.aliases
fi
Note that this will break chaining cd
with consecutive command executions