Moving Between Directory History in Fish Shell

xster
xster
Mar 4, 2014 · 1 min read

Fish shell is supreme! Finally a shell whose config doesn’t look like a Perl hack. Too bad it doesn’t get much publicity.

Here’s an awesome feature. In zsh, I’d be used to doing stuff like

dirs -v
cd -2

to move between previous directories. In fish, there’s a cd — to move to the previous history but much more powerfully, you can just do alt-left/right arrow to move through your entire directory history without typing anything.

It’s boss!

xster

Collection of tech tips and learnings

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store