Dave's Notebook

Data Science, Machine Learning, Artificial Intelligence, Visualization, and Complex Systems.
@sixhat@datasci.social wiki

fuzzy logic shell alias

March 20, 2023

I've used fzf for a long time now. It works great and I'd recommend every power user to use fzf (or any other fuzzy logic search tool)

One of the things I like about using it is to go to the folder of some file I'm working on. For example I use this alias cdf to cd into the file directory.

Just put the following alias in your shell

alias cdf='cd `dirname $(fzf)`'

Then you can cdf, search, press enter and cd into the file's directory. (Well, there's also ALT-C, but who cares)

You migth want to check this blog post about fzf.