works for every other reasonable command apart from cd, for some reason