Quantcast
Channel: Objective Development Forums
Viewing all articles
Browse latest Browse all 4524

[LB6 Action] (modified) Search Dash.app

$
0
0
I did not make this action, but I've slightly modified it.

The profile/docset keyword can be separated from the query with a space instead of a colon.

e.g. instead of ruby:Array.map, you can do ruby Array.map

Why such a trivial change? Because OSX doesn't treat colon (:) as a word separator, so if I've typed out ruby:Array and use ⌥+backspace, instead of ending up with ruby: (so I can continue with a new ruby-related search) it deletes both keyword and query, which I find disruptive.

(Note: the old colon-delimited syntax still works just fine.)

---
If you're a ruby-head, this is all I've added to the top of the script:

search = ARGV[0]
if search =~ /^[a-z0-9_-]+ ./i
  search = search.split(" ", 2).join(":")
end

output = `./dash '#{search}'`
# ...

Viewing all articles
Browse latest Browse all 4524