Wow, I wouldn't have thought of this! Pretty cool, although it won't work in my shell :XD In fish the alternative seems to be cd (dirname (status -f)).
cd (dirname (status -f))
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.