-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
I've never liked the prevd/nextd model for navigating my cd history. And the pushd/popd model, while easier to reason about, is quite limiting. So long ago I wrote a mcd (menu change directory) function for ksh (Korn shell). When I switched to zsh a few years ago I ported that function. Now that I'm using fish full-time I decided it was time to write a fish version of mcd. I'm opening this issue to see if enough people think it is useful enough to be included in the standard fish package.
Below is the function. You can put this in ~/.config/fish/functions/mcd.fish to autoload it or put it in another file and explicitly source it. Here is an example of what it looks like:
Notice that this can also effectively replace the dirh command since, if you just press [enter] or [ctrl-D] at the prompt, it does nothing other than show you your recent cd history.
I've removed the first version of the function that was in my original post. It's been replaced by the updated version in the attachment below.
