Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #16 from jmazzi/master

Fixes #13 "grep: Regular expression too big"
  • Loading branch information...
commit 502730a6823e01dcdd6844352d768734fd217075 2 parents 66d5e7b + 443baac
Mike Perham mperham authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/lunchy.rb
4 lib/lunchy.rb
View
@@ -42,8 +42,8 @@ def status(params)
pattern = params[0]
cmd = "launchctl list"
if !verbose?
- agents = "(" + plists.keys.join("|") + ")"
- cmd << " | grep -i -E \"#{agents}\""
+ agents = plists.keys.map { |k| "-e \"#{k}\"" }.join(" ")
+ cmd << " | grep -i #{agents}"
end
cmd.gsub!('.','\.')
cmd << " | grep -i \"#{pattern}\"" if pattern
Please sign in to comment.
Something went wrong with that request. Please try again.