Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fdir(find directory)

Find all folders in the given root directory that contain the specified folder or file.

For examples:

Find all git projects in ~/repos folder:

> fdir ~/repos

Find all rust projects in folder:

> fdir --has "Cargo.toml" ~/repos

After finding all the folders, combining them with the fzf and cd commands allows us to quickly navigate to the desired project or file directory.

cd $(echo $REPOS | xargs fdir | fzf)

Similar effects can also be achieved using the find or fd tools, but they cannot stop searching their subdirectories once a matching directory is found. For large projects with many subdirectories, this can consume more time, so I decided to optimize the process."

About

Find all folders in the given root directory.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages