nate-parrott / Flashlight

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

Terminal plugin doesn't work consistently #435

Open mlagerberg opened 9 years ago

mlagerberg commented 9 years ago

The terminal plugin works for the 'obvious' terminal commands, e.g. $ ls or $ nano, but not for other commands, applications or aliases that could be launched from the terminal.

For example, as an Android developer I have frequently run 'adb' in the terminal, however when I type $ adb in spotlight, Flashlight is nowhere to be seen (top result is the wiki page for Asian Development Bank). The same goes when I use run or execute instead.

thomaspaulmann commented 9 years ago

I am also interested in this feature!

benjamin-weiss commented 9 years ago

A quick look into the source code of the plugin reveals, that the plugin relies on whereis to verify if the command is valid or not. That is imho no good choice. It should either do not care at all if a command is valid and just check for $ (what I would like to see → I know what command I want to execute) or at least use which to check the validity of the command.

benjamin-weiss commented 9 years ago

Couldn't wait for someone else to fix it. :smirk: So here is a PR (#523) with an implementation where the terminal plugin works as I want it.