nate-parrott / Flashlight

The missing Spotlight plugin system
http://flashlight.nateparrott.com
Other
5.39k stars 411 forks source link

A trigger character or character sequence #137

Open ghost opened 9 years ago

ghost commented 9 years ago

It can prevent clashes with spotlight search.

Because even if Spotlight learns to rather give me browser tab with the text in a IMDB search when I type imdb some-text I wouldn't want to miss that document that I've on my machine with that very text.

So, rather having a trigger like:

So that we can type :imdb some-text or f:imdb some-text.

It will also help avoid clashes among plugins. I can see two plugins with the same trigger words one with imdb and another with imdb or i.

kopischke commented 9 years ago

:+1: to that – the more plugin keywords there are, the more likely to clash with Spotlight native search results they get.

nate-parrott commented 9 years ago

So you'd like an option to only show Flashlight results when there's a trigger character present in the search? I can do that.

ghost commented 9 years ago

@nate-parrott Yes. Thank you.

I guess that will end the conflicts with Spotlight search for good.

Also there should be some sort of rule or guidelines for claiming "trigger words" among plugins. I am not really sure how to implement this but imagine: plugin A claiming the term "imdb" and plugin B claiming the terms both "imdb" and "i" (there are actually such plugins) so there's a conflict right there although it's not with Spotlight.

lipe1966 commented 9 years ago

I Agree with this, but we could use a special character instead of a letter, like ! in ddg or # or ?, also we need some kind of curation for the plugins, and the ability for the user install it`s own plugins, so we could have more then one plugin repository. The official repository would be curated to avoid redundancies and anyone who wanted to create a separate plugin repository could create it.

nate-parrott commented 9 years ago

Hmm... a better way to avoid the keyword conflict issue might be to allow the user to define the keywords that map to each plugin on their system. It'd probably also be useful for people to be able to define their own global trigger key (!, #, $, etc) that would have to be present for plugins to match.

ghost commented 9 years ago

Yes. For example I generally prefer : for this purpose because of Vim while other might like some other character.