.bashrc: simplify cursor position logic