{"action":"opened","number":18,"pull_request":{"url":"https://api.github.com/repos/robotlolita/fuck-you/pulls/18","id":35584000,"html_url":"https://github.com/robotlolita/fuck-you/pull/18","diff_url":"https://github.com/robotlolita/fuck-you/pull/18.diff","patch_url":"https://github.com/robotlolita/fuck-you/pull/18.patch","issue_url":"https://api.github.com/repos/robotlolita/fuck-you/issues/18","number":18,"state":"open","locked":false,"title":"fixed process name matching in osx","user":{"login":"danyshaanan","id":1116738,"avatar_url":"https://avatars.githubusercontent.com/u/1116738?v=3","gravatar_id":"","url":"https://api.github.com/users/danyshaanan","html_url":"https://github.com/danyshaanan","followers_url":"https://api.github.com/users/danyshaanan/followers","following_url":"https://api.github.com/users/danyshaanan/following{/other_user}","gists_url":"https://api.github.com/users/danyshaanan/gists{/gist_id}","starred_url":"https://api.github.com/users/danyshaanan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danyshaanan/subscriptions","organizations_url":"https://api.github.com/users/danyshaanan/orgs","repos_url":"https://api.github.com/users/danyshaanan/repos","events_url":"https://api.github.com/users/danyshaanan/events{/privacy}","received_events_url":"https://api.github.com/users/danyshaanan/received_events","type":"User","site_admin":false},"body":"Processes names in osx, as listed by xps, are full paths, which makes this line fail:\r\n```js\r\nreturn new RegExp('^' + escape(pattern) + '$', 'i');\r\n```\r\nthus preventing `fuck-you` from finding processes in osx.\r\n\r\nTested by modifying the `match` function so:\r\n```\r\nfunction match(pid, pattern){ return function(process) {\r\n  if (/firefox/.test(process.name)) console.log(process.name);\r\n  return toRegExp(pattern).test(process.name)\r\n  &&     process.pid !== pid;\r\n}}\r\n```\r\n...running `fuck firefox` and getting this output:\r\n```\r\n/opt/homebrew-cask/Caskroom/firefox/latest/Firefox.app/Contents/MacOS/firefox\r\n```\r\n\r\nThis is fixed by modifying the regex in `toRegExp` by replacing `^` with `^.*/` when on darwin (osx).\r\n","created_at":"2015-05-17T08:49:26Z","updated_at":"2015-05-17T08:49:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/robotlolita/fuck-you/pulls/18/commits","review_comments_url":"https://api.github.com/repos/robotlolita/fuck-you/pulls/18/comments","review_comment_url":"https://api.github.com/repos/robotlolita/fuck-you/pulls/comments{/number}","comments_url":"https://api.github.com/repos/robotlolita/fuck-you/issues/18/comments","statuses_url":"https://api.github.com/repos/robotlolita/fuck-you/statuses/1b0f958a0aec460944099fabcd066dd57486a432","head":{"label":"danyshaanan:master","ref":"master","sha":"1b0f958a0aec460944099fabcd066dd57486a432","user":{"login":"danyshaanan","id":1116738,"avatar_url":"https://avatars.githubusercontent.com/u/1116738?v=3","gravatar_id":"","url":"https://api.github.com/users/danyshaanan","html_url":"https://github.com/danyshaanan","followers_url":"https://api.github.com/users/danyshaanan/followers","following_url":"https://api.github.com/users/danyshaanan/following{/other_user}","gists_url":"https://api.github.com/users/danyshaanan/gists{/gist_id}","starred_url":"https://api.github.com/users/danyshaanan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danyshaanan/subscriptions","organizations_url":"https://api.github.com/users/danyshaanan/orgs","repos_url":"https://api.github.com/users/danyshaanan/repos","events_url":"https://api.github.com/users/danyshaanan/events{/privacy}","received_events_url":"https://api.github.com/users/danyshaanan/received_events","type":"User","site_admin":false},"repo":{"id":26856917,"name":"fuck-you","full_name":"danyshaanan/fuck-you","owner":{"login":"danyshaanan","id":1116738,"avatar_url":"https://avatars.githubusercontent.com/u/1116738?v=3","gravatar_id":"","url":"https://api.github.com/users/danyshaanan","html_url":"https://github.com/danyshaanan","followers_url":"https://api.github.com/users/danyshaanan/followers","following_url":"https://api.github.com/users/danyshaanan/following{/other_user}","gists_url":"https://api.github.com/users/danyshaanan/gists{/gist_id}","starred_url":"https://api.github.com/users/danyshaanan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danyshaanan/subscriptions","organizations_url":"https://api.github.com/users/danyshaanan/orgs","repos_url":"https://api.github.com/users/danyshaanan/repos","events_url":"https://api.github.com/users/danyshaanan/events{/privacy}","received_events_url":"https://api.github.com/users/danyshaanan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danyshaanan/fuck-you","description":" (╯°□°）╯︵sǝssǝɔoɹd oʎ llɐ llıʞǝɓɐɹ","fork":true,"url":"https://api.github.com/repos/danyshaanan/fuck-you","forks_url":"https://api.github.com/repos/danyshaanan/fuck-you/forks","keys_url":"https://api.github.com/repos/danyshaanan/fuck-you/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danyshaanan/fuck-you/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danyshaanan/fuck-you/teams","hooks_url":"https://api.github.com/repos/danyshaanan/fuck-you/hooks","issue_events_url":"https://api.github.com/repos/danyshaanan/fuck-you/issues/events{/number}","events_url":"https://api.github.com/repos/danyshaanan/fuck-you/events","assignees_url":"https://api.github.com/repos/danyshaanan/fuck-you/assignees{/user}","branches_url":"https://api.github.com/repos/danyshaanan/fuck-you/branches{/branch}","tags_url":"https://api.github.com/repos/danyshaanan/fuck-you/tags","blobs_url":"https://api.github.com/repos/danyshaanan/fuck-you/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danyshaanan/fuck-you/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danyshaanan/fuck-you/git/refs{/sha}","trees_url":"https://api.github.com/repos/danyshaanan/fuck-you/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danyshaanan/fuck-you/statuses/{sha}","languages_url":"https://api.github.com/repos/danyshaanan/fuck-you/languages","stargazers_url":"https://api.github.com/repos/danyshaanan/fuck-you/stargazers","contributors_url":"https://api.github.com/repos/danyshaanan/fuck-you/contributors","subscribers_url":"https://api.github.com/repos/danyshaanan/fuck-you/subscribers","subscription_url":"https://api.github.com/repos/danyshaanan/fuck-you/subscription","commits_url":"https://api.github.com/repos/danyshaanan/fuck-you/commits{/sha}","git_commits_url":"https://api.github.com/repos/danyshaanan/fuck-you/git/commits{/sha}","comments_url":"https://api.github.com/repos/danyshaanan/fuck-you/comments{/number}","issue_comment_url":"https://api.github.com/repos/danyshaanan/fuck-you/issues/comments{/number}","contents_url":"https://api.github.com/repos/danyshaanan/fuck-you/contents/{+path}","compare_url":"https://api.github.com/repos/danyshaanan/fuck-you/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danyshaanan/fuck-you/merges","archive_url":"https://api.github.com/repos/danyshaanan/fuck-you/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danyshaanan/fuck-you/downloads","issues_url":"https://api.github.com/repos/danyshaanan/fuck-you/issues{/number}","pulls_url":"https://api.github.com/repos/danyshaanan/fuck-you/pulls{/number}","milestones_url":"https://api.github.com/repos/danyshaanan/fuck-you/milestones{/number}","notifications_url":"https://api.github.com/repos/danyshaanan/fuck-you/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danyshaanan/fuck-you/labels{/name}","releases_url":"https://api.github.com/repos/danyshaanan/fuck-you/releases{/id}","created_at":"2014-11-19T10:47:21Z","updated_at":"2014-11-19T10:49:14Z","pushed_at":"2015-05-17T08:24:47Z","git_url":"git://github.com/danyshaanan/fuck-you.git","ssh_url":"git@github.com:danyshaanan/fuck-you.git","clone_url":"https://github.com/danyshaanan/fuck-you.git","svn_url":"https://github.com/danyshaanan/fuck-you","homepage":null,"size":198,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"robotlolita:master","ref":"master","sha":"be75480695c1b08669bd89ff468dfa47dc696651","user":{"login":"robotlolita","id":406477,"avatar_url":"https://avatars.githubusercontent.com/u/406477?v=3","gravatar_id":"","url":"https://api.github.com/users/robotlolita","html_url":"https://github.com/robotlolita","followers_url":"https://api.github.com/users/robotlolita/followers","following_url":"https://api.github.com/users/robotlolita/following{/other_user}","gists_url":"https://api.github.com/users/robotlolita/gists{/gist_id}","starred_url":"https://api.github.com/users/robotlolita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robotlolita/subscriptions","organizations_url":"https://api.github.com/users/robotlolita/orgs","repos_url":"https://api.github.com/users/robotlolita/repos","events_url":"https://api.github.com/users/robotlolita/events{/privacy}","received_events_url":"https://api.github.com/users/robotlolita/received_events","type":"User","site_admin":false},"repo":{"id":17035253,"name":"fuck-you","full_name":"robotlolita/fuck-you","owner":{"login":"robotlolita","id":406477,"avatar_url":"https://avatars.githubusercontent.com/u/406477?v=3","gravatar_id":"","url":"https://api.github.com/users/robotlolita","html_url":"https://github.com/robotlolita","followers_url":"https://api.github.com/users/robotlolita/followers","following_url":"https://api.github.com/users/robotlolita/following{/other_user}","gists_url":"https://api.github.com/users/robotlolita/gists{/gist_id}","starred_url":"https://api.github.com/users/robotlolita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robotlolita/subscriptions","organizations_url":"https://api.github.com/users/robotlolita/orgs","repos_url":"https://api.github.com/users/robotlolita/repos","events_url":"https://api.github.com/users/robotlolita/events{/privacy}","received_events_url":"https://api.github.com/users/robotlolita/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/robotlolita/fuck-you","description":" (╯°□°）╯︵sǝssǝɔoɹd oʎ llɐ llıʞǝɓɐɹ","fork":false,"url":"https://api.github.com/repos/robotlolita/fuck-you","forks_url":"https://api.github.com/repos/robotlolita/fuck-you/forks","keys_url":"https://api.github.com/repos/robotlolita/fuck-you/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robotlolita/fuck-you/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robotlolita/fuck-you/teams","hooks_url":"https://api.github.com/repos/robotlolita/fuck-you/hooks","issue_events_url":"https://api.github.com/repos/robotlolita/fuck-you/issues/events{/number}","events_url":"https://api.github.com/repos/robotlolita/fuck-you/events","assignees_url":"https://api.github.com/repos/robotlolita/fuck-you/assignees{/user}","branches_url":"https://api.github.com/repos/robotlolita/fuck-you/branches{/branch}","tags_url":"https://api.github.com/repos/robotlolita/fuck-you/tags","blobs_url":"https://api.github.com/repos/robotlolita/fuck-you/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robotlolita/fuck-you/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robotlolita/fuck-you/git/refs{/sha}","trees_url":"https://api.github.com/repos/robotlolita/fuck-you/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robotlolita/fuck-you/statuses/{sha}","languages_url":"https://api.github.com/repos/robotlolita/fuck-you/languages","stargazers_url":"https://api.github.com/repos/robotlolita/fuck-you/stargazers","contributors_url":"https://api.github.com/repos/robotlolita/fuck-you/contributors","subscribers_url":"https://api.github.com/repos/robotlolita/fuck-you/subscribers","subscription_url":"https://api.github.com/repos/robotlolita/fuck-you/subscription","commits_url":"https://api.github.com/repos/robotlolita/fuck-you/commits{/sha}","git_commits_url":"https://api.github.com/repos/robotlolita/fuck-you/git/commits{/sha}","comments_url":"https://api.github.com/repos/robotlolita/fuck-you/comments{/number}","issue_comment_url":"https://api.github.com/repos/robotlolita/fuck-you/issues/comments{/number}","contents_url":"https://api.github.com/repos/robotlolita/fuck-you/contents/{+path}","compare_url":"https://api.github.com/repos/robotlolita/fuck-you/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robotlolita/fuck-you/merges","archive_url":"https://api.github.com/repos/robotlolita/fuck-you/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robotlolita/fuck-you/downloads","issues_url":"https://api.github.com/repos/robotlolita/fuck-you/issues{/number}","pulls_url":"https://api.github.com/repos/robotlolita/fuck-you/pulls{/number}","milestones_url":"https://api.github.com/repos/robotlolita/fuck-you/milestones{/number}","notifications_url":"https://api.github.com/repos/robotlolita/fuck-you/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robotlolita/fuck-you/labels{/name}","releases_url":"https://api.github.com/repos/robotlolita/fuck-you/releases{/id}","created_at":"2014-02-20T20:53:34Z","updated_at":"2015-05-16T14:27:40Z","pushed_at":"2015-05-16T19:45:34Z","git_url":"git://github.com/robotlolita/fuck-you.git","ssh_url":"git@github.com:robotlolita/fuck-you.git","clone_url":"https://github.com/robotlolita/fuck-you.git","svn_url":"https://github.com/robotlolita/fuck-you","homepage":null,"size":323,"stargazers_count":816,"watchers_count":816,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":3,"forks":22,"open_issues":3,"watchers":816,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/robotlolita/fuck-you/pulls/18"},"html":{"href":"https://github.com/robotlolita/fuck-you/pull/18"},"issue":{"href":"https://api.github.com/repos/robotlolita/fuck-you/issues/18"},"comments":{"href":"https://api.github.com/repos/robotlolita/fuck-you/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/robotlolita/fuck-you/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/robotlolita/fuck-you/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/robotlolita/fuck-you/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/robotlolita/fuck-you/statuses/1b0f958a0aec460944099fabcd066dd57486a432"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}