I'd like to execute a particular bash function when I enter a new directory. Somethink like:
alias cd="cd $@ && myfunction"
$@ doesn't work there, and adding a backslash doesn't help. I'm also a little worried about messing with cd, and it would be nice if this worked for other commands which changed directory, like pushd and popd.
Any better aliases/commands?