Skip to content

dbrockman/fuzzy-search-most-recent-dir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fuzzy-search-most-recent-dir

Print the name of the most recently modified directory that matches a fuzzy search

Install

$ npm install --global fuzzy-search-most-recent-dir

Usage

$ fuzzy-search-most-recent-dir <directory> <fuzzy-search-pattern>

Purpose

I wanted a fast way to cd between different projects.

The cdd function below jumps to the most recently modified project directory that matches the fuzzy search.

For example cdd featfla would cd directly to the feature-flag-api directory.

cdd without any search pattern will cd to the most recently modified project.

cdd() {
  cd `fuzzy-search-most-recent-dir /path/to/projects "$1"`
}

About

Print the name of the most recently modified dir that matches a fuzzy search

Resources

License

Stars

Watchers

Forks

Packages

No packages published