e2o Posted June 13 Share Posted June 13 Howdy! Alfred's standard application searching works great figuring out abbreviations etc. - like "MM" gets me to Mailmate no problem even though the letters MM never appear together in the app name. Even "mate" works. Why does this not happen for files and folders? I have a document called "distance calculator.xlsx", and no matter how many times I open it with file search ( ' ), if I don't type a string exactly as it appears in the file name (and preferably the initial letters), it won't find it. I'd like to type: " ' dcalc " and find it. (I'm sure if there was an app named "Distance Calculator, "dcalc" would find it) Similarly, I use the workflow "Simple Folder Search" for folders. I'm constantly starting folder navigation in a folder called "Notes and Reference". My muscle memory from LaunchBar is "nar" - and bam, there it would be. But I've searched for this folder hundreds of times with " fs n.... " , and it is clear that "nar" is never going to find it. I must type in " fs note..." to bring it up. And, although this is probably the most searched folder by far, it still is occasionally not the top time after "no" or "not" and I have to keep going... Why are there not more file and folder smarts like in Application searching? And, if it isn't going to get smarter, is there a mechanism to "pin" or "favorite"? Thanks, - eric Link to comment
vitor Posted June 13 Share Posted June 13 Alfred queries the Spotlight database, and full fuzzy searching has a performance cost. But there are workflows for that. Link to comment
e2o Posted June 13 Author Share Posted June 13 thanks @vitor - that does not appear to resolve names from initial letters - like NAR -> Notes and Reference. Additionally (and this is my perspective trying to make the transition from launchbar), "nar" (the LaunchBar solution) is a ton easier than "fzf notes and ^d" I'd say Simple File Search is probably still better for my used case. I'm really trying to embrace Alfred. Yes, it does more, but it is WAY less efficient and economical with keystrokes. This idea of preceding search with 3-6 keystrokes *before* you search is such a speedbump. (' or fs, or open, or find). I should be able to just Search, and *then* indicate what I want to do with return, or arrows or modifiers. Link to comment
zeitlings Posted June 15 Share Posted June 15 Hey @e2o, here are some strategies to speed things up: You can change the keywords to whatever you'd like You can set up keyboard shortcuts, viz. hotkeys to bypass keyword keystrokes altogether You can set up custom fallback searches And a general tip: You can initiate the default file search by hitting the space bar, which is equivalent to typing out the tick (') The initial letter matching is a specific fuzzy search flavour and arguably a matter of taste. With proper ranking of the results, to not wash away literal or partial matches, it's a nice thing for sure. There have been implementations in other contexts, e.g. here: alfred-fuzzy One idea would be to substitute the fzf command line tool used in an existing workflow with something that does what you want. A quick search reveals this: fzf-abbrev, which according to the description "may be used as drop-in replacement for fzf". (go install github.com/sergei-dyshel/fzf-abbrev@latest) I think the main reason why this kind of fuzzy matching isn't available globally is because it can be extremely slow if your entire file system has to be matched against each keystroke. If you're willing to limit the search scope though, it's not too hard to just write a workflow that does what you want. Here is a "demo" that uses fzf-abbrev and somehow escalated into a proper workflow 😅 -> Fuzzy Search Workflow Link to comment
e2o Posted June 17 Author Share Posted June 17 Thanks @zeilings! fzf-abbrev looks nice. the GitHub page says install with: go get github.com/sergei-dyshel/fzf-abbrev Not sure how that install works. My terminal returns "command not found: go" Link to comment
zeitlings Posted June 17 Share Posted June 17 (edited) 23 minutes ago, e2o said: Thanks @zeilings! fzf-abbrev looks nice. the GitHub page says install with: go get github.com/sergei-dyshel/fzf-abbrev Not sure how that install works. My terminal returns "command not found: go" Go is a programming language by backed by Google. You can install it with homebrew: brew install go. After installing it you will notice that the proposed way to install the command (go get github.com/sergei-dyshel/fzf-abbrev) has been deprecated. $ go get github.com/sergei-dyshel/fzf-abbrev go: go.mod file not found in current directory or any parent directory. 'go get' is no longer supported outside a module. To build and install a command, use 'go install' with a version, like 'go install example.com/cmd@latest' For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'. Instead, this will work: go install github.com/sergei-dyshel/fzf-abbrev@latest Edited June 17 by zeitlings Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now