# Override the "cd" keyword with a copy/paste friendly function.
function cd() {
	if [ $# -eq 0 ]; then
		builtin cd
	else
		if [ -f "$1" ]; then
			builtin cd "$(dirname "$1")"
		else
			builtin cd "$1"
		fi
	fi
}
