Update prompt after exiting editor or vi and simplify check