GithubHelp home page GithubHelp logo

datygra / alfred-fuzzyfolders Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deanishe/alfred-fuzzyfolders

0.0 1.0 0.0 6.21 MB

Fuzzy search across folder subdirectories

License: MIT License

Python 100.00%

alfred-fuzzyfolders's Introduction

Fuzzy Folders Alfred Workflow

Fuzzy search across folder subtrees. Add your own keywords to directly search specific folders.

This Workflow provides partial matching of path components, allowing you to drill down into your filesystem with a space-separated query. Each "word" of the query will be matched against the components of a directory or file's path, so a three-word query will only match at least three levels down from the specified root directory.

You can use a File Action to intiate a fuzzy search on a folder or to assign a keyword to perform a fuzzy search on that folder.

Download

Get the Workflow from GitHub or Packal.

Commands

  • fuzzy — List your Fuzzy Folders
    • — Edit Fuzzy Folder settings
    • ⌘+↩ — Start a Fuzzy Folder search with the associated keyword
    • ⌥+↩ — Delete the keyword–Fuzzy Folder combination
  • fzyup — Recreate the Script Filters from your saved configuration (useful after an update)
  • fzyhelp — Open the help file in your browser

Settings

You can specify these settings globally as defaults for all Fuzzy Folders or on a per-folder basis. For ad-hoc searches via the Fuzzy Search Here file action, the default settings always apply.

Use keyword fuzzy to view and edit settings.

  • Minimum query length — The last "word" of a query must be this long to trigger a search. Default is 1, but increase this number if the search is too slow. This is very often the case if you're searching a large subtree and/or also choose to search files.
  • Search scope — Choose to search only for folders, files or both. Note: In most cases, searches including files are significantly slower. Consider increasing the minimum query length to speed up slow searches.

File Actions

  • Fuzzy Search Here — Fuzzy search this folder
  • Add Fuzzy Folder — Set a keyword for this folder for faster fuzzy searching

Search result actions

  • — Open folder in Finder
  • ⌘+↩ — Browse folder in Alfred

Excludes

Fuzzy Folders supports global and folder-specific glob-style excludes (similar to .gitignore).

Currently, these can only be configured by editing the settings.json file by hand. To open settings.json, enter the query fuzzy workflow:opendata into Alfred. This will open the workflow's data directory in Finder and reveal the settings.json file.

The settings.json file will look something like this:

{
  "defaults": {
    "min": 2,
    "scope": 1
  },
  "profiles": {
    "1": {
      "dirpath": "/Users/dean/Documents",
      "keyword": "docs"
    },
    "2": {
      "dirpath": "/Users/dean/Code",
      "excludes": [
        "*.pyc",
        "/alfred-*"
      ],
      "keyword": "code",
      "scope": 3
    },
    "3": {
      "dirpath": "/Volumes/Media/Video",
      "keyword": "vids",
      "scope": 3
    },
    "4": {
      "dirpath": "/Users/dean/Documents/Translations",
      "excludes": [],
      "keyword": "trans"
    }
  }
}

The defaults key may not be present if you haven't changed the default settings and won't have an excludes member. Any profiles (saved fuzzy folders) added using a version of the workflow with support for excludes will be created with an empty list for the key excludes, but profiles created with earlier versions won't have an excludes member. Add it by hand.

excludes should be a list of strings containing .gitignore/shell-style patterns, e.g.:

"excludes": [
        "*.pyc",
        "/alfred-*"
      ],

In contrast to the other default settings, min (minimum query length) and scope (search folders (1), files (2) or both (3)), the default excludes will be added to folder-specific ones, not replaced by them.

So to exclude compiled Python files from all fuzzy folders, add *.pyc to the excludes list under defaults:

{
  "defaults": {
    "min": 2,
    "scope": 1,
    "excludes": ["*.pyc"]
  }
}

Bugs, questions, feedback

You can open an issue on GitHub, or post on the Alfred Forum.

Licensing, other stuff

This Workflow is made available under the MIT Licence.

The icon was made by Jono Hunt.

It uses docopt and Alfred-Workflow.

alfred-fuzzyfolders's People

Contributors

deanishe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.