Jump to content

Fuzzy Search for Directories and Subdirectories (entire Path)


Recommended Posts

Is there a workflow out there that will allow to search through an entire directly structure with fuzzy search... meaning

 

/path/here/goes/project/this/plugins/

 

where i could type here and plugins

 

and press enter to be taken to /path/here/goes/project/this/plugins/

 

thanks so much for your help...

Link to comment

Is there a workflow out there that will allow to search through an entire directly structure with fuzzy search... meaning

 

/path/here/goes/project/this/plugins/

 

where i could type here and plugins

 

and press enter to be taken to /path/here/goes/project/this/plugins/

 

thanks so much for your help...

 

Assuming you activate the locate daemon, you can do something like this:

 

locate vim plugin | grep "/vim/.*/plugin/"

 

You can find information about building the locate database here: http://osxdaily.com/2011/11/02/enable-and-use-the-locate-command-in-the-mac-os-x-terminal/

 

You'll have to write the workflow that uses the locate information to output a list of file paths.

Link to comment

Assuming you activate the locate daemon, you can do something like this:

 

locate vim plugin | grep "/vim/.*/plugin/"

 

You can find information about building the locate database here: http://osxdaily.com/2011/11/02/enable-and-use-the-locate-command-in-the-mac-os-x-terminal/

 

You'll have to write the workflow that uses the locate information to output a list of file paths.

 

that's a great approach... do you think performance would be up to par?

 

also any clue how the workflow would look like? I've never build one...

 

thanks for your help

Link to comment

that's a great approach... do you think performance would be up to par?

 

also any clue how the workflow would look like? I've never build one...

 

thanks for your help

 

Look around for other workflows that return file results, you can tailor it to what you want. A couple more hints. The locate command by default can't see your user files, you'll have to modify the /usr/libexec/locate.updatedb script to replace the 'nobody' user with your user id. When you construct the feedback xml, add 'type = "file"' to your entries and Alfred will let you right arrow on the results.

 

If what you want isn't just a path search but a path-specific file search, then you can use mdfind instead of locate. But that doesn't seem to be what you want.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...