{"action":"created","comment":{"url":"https://api.github.com/repos/prestodb/presto/pulls/comments/59965956","id":59965956,"diff_hunk":"@@ -208,36 +209,23 @@ private static void runConsole(QueryRunner queryRunner, ClientSession session, A\n                             System.out.println(getHelpText());\n                             continue;\n                     }\n+\n+                    if (command.startsWith(\"source \")) {\n+                        String path = command.split(\" \")[1];","path":"presto-cli/src/main/java/com/facebook/presto/cli/Console.java","position":16,"original_position":16,"commit_id":"53cef83c3ed64eea7935eb1b38a11fa14d994a07","original_commit_id":"53cef83c3ed64eea7935eb1b38a11fa14d994a07","user":{"login":"harunurhan","id":4868667,"avatar_url":"https://avatars.githubusercontent.com/u/4868667?v=3","gravatar_id":"","url":"https://api.github.com/users/harunurhan","html_url":"https://github.com/harunurhan","followers_url":"https://api.github.com/users/harunurhan/followers","following_url":"https://api.github.com/users/harunurhan/following{/other_user}","gists_url":"https://api.github.com/users/harunurhan/gists{/gist_id}","starred_url":"https://api.github.com/users/harunurhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harunurhan/subscriptions","organizations_url":"https://api.github.com/users/harunurhan/orgs","repos_url":"https://api.github.com/users/harunurhan/repos","events_url":"https://api.github.com/users/harunurhan/events{/privacy}","received_events_url":"https://api.github.com/users/harunurhan/received_events","type":"User","site_admin":false},"body":"Show it be allowed to give multiple paths (space separated)? \r\nIn that case we can do something like:\r\n~~~\r\n\r\nforeach path in command.split\r\n    query <- query_from_file(path)\r\n    sql <- sql + query\r\nexecute(sql)","created_at":"2016-04-16T11:02:03Z","updated_at":"2016-04-16T11:02:03Z","html_url":"https://github.com/prestodb/presto/pull/5038#discussion_r59965956","pull_request_url":"https://api.github.com/repos/prestodb/presto/pulls/5038","_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments/59965956"},"html":{"href":"https://github.com/prestodb/presto/pull/5038#discussion_r59965956"},"pull_request":{"href":"https://api.github.com/repos/prestodb/presto/pulls/5038"}}},"pull_request":{"url":"https://api.github.com/repos/prestodb/presto/pulls/5038","id":66712053,"html_url":"https://github.com/prestodb/presto/pull/5038","diff_url":"https://github.com/prestodb/presto/pull/5038.diff","patch_url":"https://github.com/prestodb/presto/pull/5038.patch","issue_url":"https://api.github.com/repos/prestodb/presto/issues/5038","number":5038,"state":"open","locked":false,"title":"Add source command to CLI","user":{"login":"harunurhan","id":4868667,"avatar_url":"https://avatars.githubusercontent.com/u/4868667?v=3","gravatar_id":"","url":"https://api.github.com/users/harunurhan","html_url":"https://github.com/harunurhan","followers_url":"https://api.github.com/users/harunurhan/followers","following_url":"https://api.github.com/users/harunurhan/following{/other_user}","gists_url":"https://api.github.com/users/harunurhan/gists{/gist_id}","starred_url":"https://api.github.com/users/harunurhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harunurhan/subscriptions","organizations_url":"https://api.github.com/users/harunurhan/orgs","repos_url":"https://api.github.com/users/harunurhan/repos","events_url":"https://api.github.com/users/harunurhan/events{/privacy}","received_events_url":"https://api.github.com/users/harunurhan/received_events","type":"User","site_admin":false},"body":"#5025 \r\n\r\nA question:\r\nCurrently It adds all queries in source file to the history, is this OK or it should add command itself? (like `source /path/to/file`)","created_at":"2016-04-15T22:11:05Z","updated_at":"2016-04-16T11:02:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b96afb279832efec841439bbd92558ad74c2814","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/prestodb/presto/pulls/5038/commits","review_comments_url":"https://api.github.com/repos/prestodb/presto/pulls/5038/comments","review_comment_url":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prestodb/presto/issues/5038/comments","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/53cef83c3ed64eea7935eb1b38a11fa14d994a07","head":{"label":"harunurhan:fix5025","ref":"fix5025","sha":"53cef83c3ed64eea7935eb1b38a11fa14d994a07","user":{"login":"harunurhan","id":4868667,"avatar_url":"https://avatars.githubusercontent.com/u/4868667?v=3","gravatar_id":"","url":"https://api.github.com/users/harunurhan","html_url":"https://github.com/harunurhan","followers_url":"https://api.github.com/users/harunurhan/followers","following_url":"https://api.github.com/users/harunurhan/following{/other_user}","gists_url":"https://api.github.com/users/harunurhan/gists{/gist_id}","starred_url":"https://api.github.com/users/harunurhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harunurhan/subscriptions","organizations_url":"https://api.github.com/users/harunurhan/orgs","repos_url":"https://api.github.com/users/harunurhan/repos","events_url":"https://api.github.com/users/harunurhan/events{/privacy}","received_events_url":"https://api.github.com/users/harunurhan/received_events","type":"User","site_admin":false},"repo":{"id":40881623,"name":"presto","full_name":"harunurhan/presto","owner":{"login":"harunurhan","id":4868667,"avatar_url":"https://avatars.githubusercontent.com/u/4868667?v=3","gravatar_id":"","url":"https://api.github.com/users/harunurhan","html_url":"https://github.com/harunurhan","followers_url":"https://api.github.com/users/harunurhan/followers","following_url":"https://api.github.com/users/harunurhan/following{/other_user}","gists_url":"https://api.github.com/users/harunurhan/gists{/gist_id}","starred_url":"https://api.github.com/users/harunurhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harunurhan/subscriptions","organizations_url":"https://api.github.com/users/harunurhan/orgs","repos_url":"https://api.github.com/users/harunurhan/repos","events_url":"https://api.github.com/users/harunurhan/events{/privacy}","received_events_url":"https://api.github.com/users/harunurhan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/harunurhan/presto","description":"Distributed SQL query engine for running interactive analytic queries against big data sources.","fork":true,"url":"https://api.github.com/repos/harunurhan/presto","forks_url":"https://api.github.com/repos/harunurhan/presto/forks","keys_url":"https://api.github.com/repos/harunurhan/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/harunurhan/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/harunurhan/presto/teams","hooks_url":"https://api.github.com/repos/harunurhan/presto/hooks","issue_events_url":"https://api.github.com/repos/harunurhan/presto/issues/events{/number}","events_url":"https://api.github.com/repos/harunurhan/presto/events","assignees_url":"https://api.github.com/repos/harunurhan/presto/assignees{/user}","branches_url":"https://api.github.com/repos/harunurhan/presto/branches{/branch}","tags_url":"https://api.github.com/repos/harunurhan/presto/tags","blobs_url":"https://api.github.com/repos/harunurhan/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/harunurhan/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/harunurhan/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/harunurhan/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/harunurhan/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/harunurhan/presto/languages","stargazers_url":"https://api.github.com/repos/harunurhan/presto/stargazers","contributors_url":"https://api.github.com/repos/harunurhan/presto/contributors","subscribers_url":"https://api.github.com/repos/harunurhan/presto/subscribers","subscription_url":"https://api.github.com/repos/harunurhan/presto/subscription","commits_url":"https://api.github.com/repos/harunurhan/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/harunurhan/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/harunurhan/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/harunurhan/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/harunurhan/presto/contents/{+path}","compare_url":"https://api.github.com/repos/harunurhan/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/harunurhan/presto/merges","archive_url":"https://api.github.com/repos/harunurhan/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/harunurhan/presto/downloads","issues_url":"https://api.github.com/repos/harunurhan/presto/issues{/number}","pulls_url":"https://api.github.com/repos/harunurhan/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/harunurhan/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/harunurhan/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/harunurhan/presto/labels{/name}","releases_url":"https://api.github.com/repos/harunurhan/presto/releases{/id}","deployments_url":"https://api.github.com/repos/harunurhan/presto/deployments","created_at":"2015-08-17T09:27:40Z","updated_at":"2016-01-23T19:59:53Z","pushed_at":"2016-04-15T22:12:55Z","git_url":"git://github.com/harunurhan/presto.git","ssh_url":"git@github.com:harunurhan/presto.git","clone_url":"https://github.com/harunurhan/presto.git","svn_url":"https://github.com/harunurhan/presto","homepage":"https://prestodb.io","size":59356,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"prestodb:master","ref":"master","sha":"c2b87636dd91e2412adfc7518abf157fdc9c4995","user":{"login":"prestodb","id":6882181,"avatar_url":"https://avatars.githubusercontent.com/u/6882181?v=3","gravatar_id":"","url":"https://api.github.com/users/prestodb","html_url":"https://github.com/prestodb","followers_url":"https://api.github.com/users/prestodb/followers","following_url":"https://api.github.com/users/prestodb/following{/other_user}","gists_url":"https://api.github.com/users/prestodb/gists{/gist_id}","starred_url":"https://api.github.com/users/prestodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestodb/subscriptions","organizations_url":"https://api.github.com/users/prestodb/orgs","repos_url":"https://api.github.com/users/prestodb/repos","events_url":"https://api.github.com/users/prestodb/events{/privacy}","received_events_url":"https://api.github.com/users/prestodb/received_events","type":"Organization","site_admin":false},"repo":{"id":5349565,"name":"presto","full_name":"prestodb/presto","owner":{"login":"prestodb","id":6882181,"avatar_url":"https://avatars.githubusercontent.com/u/6882181?v=3","gravatar_id":"","url":"https://api.github.com/users/prestodb","html_url":"https://github.com/prestodb","followers_url":"https://api.github.com/users/prestodb/followers","following_url":"https://api.github.com/users/prestodb/following{/other_user}","gists_url":"https://api.github.com/users/prestodb/gists{/gist_id}","starred_url":"https://api.github.com/users/prestodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestodb/subscriptions","organizations_url":"https://api.github.com/users/prestodb/orgs","repos_url":"https://api.github.com/users/prestodb/repos","events_url":"https://api.github.com/users/prestodb/events{/privacy}","received_events_url":"https://api.github.com/users/prestodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prestodb/presto","description":"Distributed SQL query engine for big data","fork":false,"url":"https://api.github.com/repos/prestodb/presto","forks_url":"https://api.github.com/repos/prestodb/presto/forks","keys_url":"https://api.github.com/repos/prestodb/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prestodb/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prestodb/presto/teams","hooks_url":"https://api.github.com/repos/prestodb/presto/hooks","issue_events_url":"https://api.github.com/repos/prestodb/presto/issues/events{/number}","events_url":"https://api.github.com/repos/prestodb/presto/events","assignees_url":"https://api.github.com/repos/prestodb/presto/assignees{/user}","branches_url":"https://api.github.com/repos/prestodb/presto/branches{/branch}","tags_url":"https://api.github.com/repos/prestodb/presto/tags","blobs_url":"https://api.github.com/repos/prestodb/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prestodb/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prestodb/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/prestodb/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/prestodb/presto/languages","stargazers_url":"https://api.github.com/repos/prestodb/presto/stargazers","contributors_url":"https://api.github.com/repos/prestodb/presto/contributors","subscribers_url":"https://api.github.com/repos/prestodb/presto/subscribers","subscription_url":"https://api.github.com/repos/prestodb/presto/subscription","commits_url":"https://api.github.com/repos/prestodb/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/prestodb/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/prestodb/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/prestodb/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/prestodb/presto/contents/{+path}","compare_url":"https://api.github.com/repos/prestodb/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prestodb/presto/merges","archive_url":"https://api.github.com/repos/prestodb/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prestodb/presto/downloads","issues_url":"https://api.github.com/repos/prestodb/presto/issues{/number}","pulls_url":"https://api.github.com/repos/prestodb/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/prestodb/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/prestodb/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prestodb/presto/labels{/name}","releases_url":"https://api.github.com/repos/prestodb/presto/releases{/id}","deployments_url":"https://api.github.com/repos/prestodb/presto/deployments","created_at":"2012-08-09T01:03:37Z","updated_at":"2016-04-16T06:50:32Z","pushed_at":"2016-04-16T06:52:40Z","git_url":"git://github.com/prestodb/presto.git","ssh_url":"git@github.com:prestodb/presto.git","clone_url":"https://github.com/prestodb/presto.git","svn_url":"https://github.com/prestodb/presto","homepage":"https://prestodb.io","size":147616,"stargazers_count":4661,"watchers_count":4661,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1353,"mirror_url":null,"open_issues_count":583,"forks":1353,"open_issues":583,"watchers":4661,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/5038"},"html":{"href":"https://github.com/prestodb/presto/pull/5038"},"issue":{"href":"https://api.github.com/repos/prestodb/presto/issues/5038"},"comments":{"href":"https://api.github.com/repos/prestodb/presto/issues/5038/comments"},"review_comments":{"href":"https://api.github.com/repos/prestodb/presto/pulls/5038/comments"},"review_comment":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prestodb/presto/pulls/5038/commits"},"statuses":{"href":"https://api.github.com/repos/prestodb/presto/statuses/53cef83c3ed64eea7935eb1b38a11fa14d994a07"}}}}