{"action":"created","comment":{"url":"https://api.github.com/repos/tmuxinator/tmuxinator/pulls/comments/58789635","id":58789635,"diff_hunk":"@@ -147,6 +147,12 @@ def tmux_command\n       yaml[\"tmux_command\"] || \"tmux\"\n     end\n \n+    def tmux_has_session?(name)\n+      sessions = `#{tmux_command} ls`\n+\n+      !sessions.match(\"^#{name}:\")","path":"lib/tmuxinator/project.rb","position":null,"original_position":7,"commit_id":"b003749ffa183d507fcd32153d4f5a6a58bbb03f","original_commit_id":"d8e31ff3714285951f82e684b3c8c33491cae63f","user":{"login":"Richard-Walton","id":481427,"avatar_url":"https://avatars.githubusercontent.com/u/481427?v=3","gravatar_id":"","url":"https://api.github.com/users/Richard-Walton","html_url":"https://github.com/Richard-Walton","followers_url":"https://api.github.com/users/Richard-Walton/followers","following_url":"https://api.github.com/users/Richard-Walton/following{/other_user}","gists_url":"https://api.github.com/users/Richard-Walton/gists{/gist_id}","starred_url":"https://api.github.com/users/Richard-Walton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Richard-Walton/subscriptions","organizations_url":"https://api.github.com/users/Richard-Walton/orgs","repos_url":"https://api.github.com/users/Richard-Walton/repos","events_url":"https://api.github.com/users/Richard-Walton/events{/privacy}","received_events_url":"https://api.github.com/users/Richard-Walton/received_events","type":"User","site_admin":false},"body":"Err..., yeah that's just poor logic.  My bad - I was rushing to get this pushed so I could get back to work.\r\n\r\nFixed in next commit.","created_at":"2016-04-06T21:59:42Z","updated_at":"2016-04-06T21:59:42Z","html_url":"https://github.com/tmuxinator/tmuxinator/pull/404#discussion_r58789635","pull_request_url":"https://api.github.com/repos/tmuxinator/tmuxinator/pulls/404","_links":{"self":{"href":"https://api.github.com/repos/tmuxinator/tmuxinator/pulls/comments/58789635"},"html":{"href":"https://github.com/tmuxinator/tmuxinator/pull/404#discussion_r58789635"},"pull_request":{"href":"https://api.github.com/repos/tmuxinator/tmuxinator/pulls/404"}}},"pull_request":{"url":"https://api.github.com/repos/tmuxinator/tmuxinator/pulls/404","id":65270754,"html_url":"https://github.com/tmuxinator/tmuxinator/pull/404","diff_url":"https://github.com/tmuxinator/tmuxinator/pull/404.diff","patch_url":"https://github.com/tmuxinator/tmuxinator/pull/404.patch","issue_url":"https://api.github.com/repos/tmuxinator/tmuxinator/issues/404","number":404,"state":"open","locked":false,"title":"Updated \"has session\" check","user":{"login":"Richard-Walton","id":481427,"avatar_url":"https://avatars.githubusercontent.com/u/481427?v=3","gravatar_id":"","url":"https://api.github.com/users/Richard-Walton","html_url":"https://github.com/Richard-Walton","followers_url":"https://api.github.com/users/Richard-Walton/followers","following_url":"https://api.github.com/users/Richard-Walton/following{/other_user}","gists_url":"https://api.github.com/users/Richard-Walton/gists{/gist_id}","starred_url":"https://api.github.com/users/Richard-Walton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Richard-Walton/subscriptions","organizations_url":"https://api.github.com/users/Richard-Walton/orgs","repos_url":"https://api.github.com/users/Richard-Walton/repos","events_url":"https://api.github.com/users/Richard-Walton/events{/privacy}","received_events_url":"https://api.github.com/users/Richard-Walton/received_events","type":"User","site_admin":false},"body":"Fix for: https://github.com/tmuxinator/tmuxinator/issues/402\r\n\r\nAlso, improved template rendering to eliminate dead code if the session exists.\r\n\r\nI'm not well versed in Ruby code - Apologies if I've done something crazy!","created_at":"2016-04-05T09:15:46Z","updated_at":"2016-04-06T21:59:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8c886e1e891cfbd156dfefb4482365228a13e85","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tmuxinator/tmuxinator/pulls/404/commits","review_comments_url":"https://api.github.com/repos/tmuxinator/tmuxinator/pulls/404/comments","review_comment_url":"https://api.github.com/repos/tmuxinator/tmuxinator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tmuxinator/tmuxinator/issues/404/comments","statuses_url":"https://api.github.com/repos/tmuxinator/tmuxinator/statuses/b003749ffa183d507fcd32153d4f5a6a58bbb03f","head":{"label":"Richard-Walton:master","ref":"master","sha":"b003749ffa183d507fcd32153d4f5a6a58bbb03f","user":{"login":"Richard-Walton","id":481427,"avatar_url":"https://avatars.githubusercontent.com/u/481427?v=3","gravatar_id":"","url":"https://api.github.com/users/Richard-Walton","html_url":"https://github.com/Richard-Walton","followers_url":"https://api.github.com/users/Richard-Walton/followers","following_url":"https://api.github.com/users/Richard-Walton/following{/other_user}","gists_url":"https://api.github.com/users/Richard-Walton/gists{/gist_id}","starred_url":"https://api.github.com/users/Richard-Walton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Richard-Walton/subscriptions","organizations_url":"https://api.github.com/users/Richard-Walton/orgs","repos_url":"https://api.github.com/users/Richard-Walton/repos","events_url":"https://api.github.com/users/Richard-Walton/events{/privacy}","received_events_url":"https://api.github.com/users/Richard-Walton/received_events","type":"User","site_admin":false},"repo":{"id":55491596,"name":"tmuxinator","full_name":"Richard-Walton/tmuxinator","owner":{"login":"Richard-Walton","id":481427,"avatar_url":"https://avatars.githubusercontent.com/u/481427?v=3","gravatar_id":"","url":"https://api.github.com/users/Richard-Walton","html_url":"https://github.com/Richard-Walton","followers_url":"https://api.github.com/users/Richard-Walton/followers","following_url":"https://api.github.com/users/Richard-Walton/following{/other_user}","gists_url":"https://api.github.com/users/Richard-Walton/gists{/gist_id}","starred_url":"https://api.github.com/users/Richard-Walton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Richard-Walton/subscriptions","organizations_url":"https://api.github.com/users/Richard-Walton/orgs","repos_url":"https://api.github.com/users/Richard-Walton/repos","events_url":"https://api.github.com/users/Richard-Walton/events{/privacy}","received_events_url":"https://api.github.com/users/Richard-Walton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Richard-Walton/tmuxinator","description":"Manage complex tmux sessions easily","fork":true,"url":"https://api.github.com/repos/Richard-Walton/tmuxinator","forks_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/forks","keys_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/teams","hooks_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/hooks","issue_events_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/issues/events{/number}","events_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/events","assignees_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/assignees{/user}","branches_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/branches{/branch}","tags_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/tags","blobs_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/git/refs{/sha}","trees_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/statuses/{sha}","languages_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/languages","stargazers_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/stargazers","contributors_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/contributors","subscribers_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/subscribers","subscription_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/subscription","commits_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/commits{/sha}","git_commits_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/git/commits{/sha}","comments_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/comments{/number}","issue_comment_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/issues/comments{/number}","contents_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/contents/{+path}","compare_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/merges","archive_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/downloads","issues_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/issues{/number}","pulls_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/pulls{/number}","milestones_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/milestones{/number}","notifications_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/labels{/name}","releases_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/releases{/id}","deployments_url":"https://api.github.com/repos/Richard-Walton/tmuxinator/deployments","created_at":"2016-04-05T09:08:18Z","updated_at":"2016-04-05T09:08:24Z","pushed_at":"2016-04-06T21:57:37Z","git_url":"git://github.com/Richard-Walton/tmuxinator.git","ssh_url":"git@github.com:Richard-Walton/tmuxinator.git","clone_url":"https://github.com/Richard-Walton/tmuxinator.git","svn_url":"https://github.com/Richard-Walton/tmuxinator","homepage":"","size":526,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"tmuxinator:master","ref":"master","sha":"73e3fbed0cd9ae9910cc8ae9382c84346b02784b","user":{"login":"tmuxinator","id":6574276,"avatar_url":"https://avatars.githubusercontent.com/u/6574276?v=3","gravatar_id":"","url":"https://api.github.com/users/tmuxinator","html_url":"https://github.com/tmuxinator","followers_url":"https://api.github.com/users/tmuxinator/followers","following_url":"https://api.github.com/users/tmuxinator/following{/other_user}","gists_url":"https://api.github.com/users/tmuxinator/gists{/gist_id}","starred_url":"https://api.github.com/users/tmuxinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmuxinator/subscriptions","organizations_url":"https://api.github.com/users/tmuxinator/orgs","repos_url":"https://api.github.com/users/tmuxinator/repos","events_url":"https://api.github.com/users/tmuxinator/events{/privacy}","received_events_url":"https://api.github.com/users/tmuxinator/received_events","type":"Organization","site_admin":false},"repo":{"id":1157388,"name":"tmuxinator","full_name":"tmuxinator/tmuxinator","owner":{"login":"tmuxinator","id":6574276,"avatar_url":"https://avatars.githubusercontent.com/u/6574276?v=3","gravatar_id":"","url":"https://api.github.com/users/tmuxinator","html_url":"https://github.com/tmuxinator","followers_url":"https://api.github.com/users/tmuxinator/followers","following_url":"https://api.github.com/users/tmuxinator/following{/other_user}","gists_url":"https://api.github.com/users/tmuxinator/gists{/gist_id}","starred_url":"https://api.github.com/users/tmuxinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmuxinator/subscriptions","organizations_url":"https://api.github.com/users/tmuxinator/orgs","repos_url":"https://api.github.com/users/tmuxinator/repos","events_url":"https://api.github.com/users/tmuxinator/events{/privacy}","received_events_url":"https://api.github.com/users/tmuxinator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tmuxinator/tmuxinator","description":"Manage complex tmux sessions easily","fork":false,"url":"https://api.github.com/repos/tmuxinator/tmuxinator","forks_url":"https://api.github.com/repos/tmuxinator/tmuxinator/forks","keys_url":"https://api.github.com/repos/tmuxinator/tmuxinator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmuxinator/tmuxinator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmuxinator/tmuxinator/teams","hooks_url":"https://api.github.com/repos/tmuxinator/tmuxinator/hooks","issue_events_url":"https://api.github.com/repos/tmuxinator/tmuxinator/issues/events{/number}","events_url":"https://api.github.com/repos/tmuxinator/tmuxinator/events","assignees_url":"https://api.github.com/repos/tmuxinator/tmuxinator/assignees{/user}","branches_url":"https://api.github.com/repos/tmuxinator/tmuxinator/branches{/branch}","tags_url":"https://api.github.com/repos/tmuxinator/tmuxinator/tags","blobs_url":"https://api.github.com/repos/tmuxinator/tmuxinator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmuxinator/tmuxinator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmuxinator/tmuxinator/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmuxinator/tmuxinator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmuxinator/tmuxinator/statuses/{sha}","languages_url":"https://api.github.com/repos/tmuxinator/tmuxinator/languages","stargazers_url":"https://api.github.com/repos/tmuxinator/tmuxinator/stargazers","contributors_url":"https://api.github.com/repos/tmuxinator/tmuxinator/contributors","subscribers_url":"https://api.github.com/repos/tmuxinator/tmuxinator/subscribers","subscription_url":"https://api.github.com/repos/tmuxinator/tmuxinator/subscription","commits_url":"https://api.github.com/repos/tmuxinator/tmuxinator/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmuxinator/tmuxinator/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmuxinator/tmuxinator/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmuxinator/tmuxinator/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmuxinator/tmuxinator/contents/{+path}","compare_url":"https://api.github.com/repos/tmuxinator/tmuxinator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmuxinator/tmuxinator/merges","archive_url":"https://api.github.com/repos/tmuxinator/tmuxinator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmuxinator/tmuxinator/downloads","issues_url":"https://api.github.com/repos/tmuxinator/tmuxinator/issues{/number}","pulls_url":"https://api.github.com/repos/tmuxinator/tmuxinator/pulls{/number}","milestones_url":"https://api.github.com/repos/tmuxinator/tmuxinator/milestones{/number}","notifications_url":"https://api.github.com/repos/tmuxinator/tmuxinator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmuxinator/tmuxinator/labels{/name}","releases_url":"https://api.github.com/repos/tmuxinator/tmuxinator/releases{/id}","deployments_url":"https://api.github.com/repos/tmuxinator/tmuxinator/deployments","created_at":"2010-12-10T21:49:50Z","updated_at":"2016-04-06T14:57:34Z","pushed_at":"2016-04-06T21:57:38Z","git_url":"git://github.com/tmuxinator/tmuxinator.git","ssh_url":"git@github.com:tmuxinator/tmuxinator.git","clone_url":"https://github.com/tmuxinator/tmuxinator.git","svn_url":"https://github.com/tmuxinator/tmuxinator","homepage":"","size":860,"stargazers_count":5018,"watchers_count":5018,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":337,"mirror_url":null,"open_issues_count":43,"forks":337,"open_issues":43,"watchers":5018,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tmuxinator/tmuxinator/pulls/404"},"html":{"href":"https://github.com/tmuxinator/tmuxinator/pull/404"},"issue":{"href":"https://api.github.com/repos/tmuxinator/tmuxinator/issues/404"},"comments":{"href":"https://api.github.com/repos/tmuxinator/tmuxinator/issues/404/comments"},"review_comments":{"href":"https://api.github.com/repos/tmuxinator/tmuxinator/pulls/404/comments"},"review_comment":{"href":"https://api.github.com/repos/tmuxinator/tmuxinator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tmuxinator/tmuxinator/pulls/404/commits"},"statuses":{"href":"https://api.github.com/repos/tmuxinator/tmuxinator/statuses/b003749ffa183d507fcd32153d4f5a6a58bbb03f"}}}}