{"action":"created","comment":{"url":"https://api.github.com/repos/locationtech/geomesa/pulls/comments/91962495","pull_request_review_id":12467714,"id":91962495,"diff_hunk":"@@ -96,6 +96,27 @@ function containsElement() {\n   return 1\n }\n \n+function generateAutocomplete() {\n+  # Usage: generateAutocomplete scriptName runner\n+\n+  # First run configure autocomplete for current machine\n+  scriptName=\"$1\"\n+  COMPLETION_FILE=${GEOMESA_CONF_DIR}/${scriptName}_completion.sh\n+  if [[ ! -f \"${COMPLETION_FILE}\" ]]; then\n+    # To handle the different tool sets we name the variables and commands here and inject them into the\n+    # generated script.\n+    echo \"_${scriptName}()\" > ${COMPLETION_FILE}\n+    java ${JAVA_OPTS} ${GEOMESA_OPTS} -cp ${CLASSPATH} $2 \"help\" \"--autocomplete-function\" >> ${COMPLETION_FILE}\n+    echo \"complete -F _${scriptName} ${scriptName}; complete -F _${scriptName} bin/${scriptName};\" >> ${COMPLETION_FILE}\n+\n+    # We can't modify the caller's env so we just tell them how to.\n+    echo \"${NL}Autocompletion script for ${scriptName} has been generated. To use, run:\"\n+    echo \". ${COMPLETION_FILE}\"\n+    echo \"To persist this feature, run: \"\n+    echo \"sudo cp ${COMPLETION_FILE} /etc/bash_completion.d/ ${NL}\"","path":"geomesa-tools/bin/common-functions.sh","position":21,"original_position":21,"commit_id":"3e2fa188ab9c019232bbd20568c8173a1dbab7cb","original_commit_id":"3e2fa188ab9c019232bbd20568c8173a1dbab7cb","user":{"login":"elahrvivaz","id":7715322,"avatar_url":"https://avatars.githubusercontent.com/u/7715322?v=3","gravatar_id":"","url":"https://api.github.com/users/elahrvivaz","html_url":"https://github.com/elahrvivaz","followers_url":"https://api.github.com/users/elahrvivaz/followers","following_url":"https://api.github.com/users/elahrvivaz/following{/other_user}","gists_url":"https://api.github.com/users/elahrvivaz/gists{/gist_id}","starred_url":"https://api.github.com/users/elahrvivaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elahrvivaz/subscriptions","organizations_url":"https://api.github.com/users/elahrvivaz/orgs","repos_url":"https://api.github.com/users/elahrvivaz/repos","events_url":"https://api.github.com/users/elahrvivaz/events{/privacy}","received_events_url":"https://api.github.com/users/elahrvivaz/received_events","type":"User","site_admin":false},"body":"looks like we might be able to avoid this step and install it for them without using sudo:\r\nhttp://serverfault.com/questions/506612/standard-place-for-user-defined-bash-completion-d-scripts","created_at":"2016-12-12T15:00:06Z","updated_at":"2016-12-12T15:00:06Z","html_url":"https://github.com/locationtech/geomesa/pull/1272#discussion_r91962495","pull_request_url":"https://api.github.com/repos/locationtech/geomesa/pulls/1272","_links":{"self":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/comments/91962495"},"html":{"href":"https://github.com/locationtech/geomesa/pull/1272#discussion_r91962495"},"pull_request":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/1272"}}},"pull_request":{"url":"https://api.github.com/repos/locationtech/geomesa/pulls/1272","id":97383131,"html_url":"https://github.com/locationtech/geomesa/pull/1272","diff_url":"https://github.com/locationtech/geomesa/pull/1272.diff","patch_url":"https://github.com/locationtech/geomesa/pull/1272.patch","issue_url":"https://api.github.com/repos/locationtech/geomesa/issues/1272","number":1272,"state":"open","locked":false,"title":"GEOMESA-1263 Geomesa CLI Tools Autocomplete","user":{"login":"aheyne","id":20668140,"avatar_url":"https://avatars.githubusercontent.com/u/20668140?v=3","gravatar_id":"","url":"https://api.github.com/users/aheyne","html_url":"https://github.com/aheyne","followers_url":"https://api.github.com/users/aheyne/followers","following_url":"https://api.github.com/users/aheyne/following{/other_user}","gists_url":"https://api.github.com/users/aheyne/gists{/gist_id}","starred_url":"https://api.github.com/users/aheyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aheyne/subscriptions","organizations_url":"https://api.github.com/users/aheyne/orgs","repos_url":"https://api.github.com/users/aheyne/repos","events_url":"https://api.github.com/users/aheyne/events{/privacy}","received_events_url":"https://api.github.com/users/aheyne/received_events","type":"User","site_admin":false},"body":"* Added hidden parameter to help command to generete auto complete script.\r\n* Added calls in bash scripts to generate the actual function and alert the user of it's availability.\r\n\r\nSigned-off-by: Austin Heyne <aheyne@ccri.com>","created_at":"2016-12-09T21:27:30Z","updated_at":"2016-12-12T15:08:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d31dc7c35d0f1d6d6718b225967f55449880333","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/locationtech/geomesa/pulls/1272/commits","review_comments_url":"https://api.github.com/repos/locationtech/geomesa/pulls/1272/comments","review_comment_url":"https://api.github.com/repos/locationtech/geomesa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/locationtech/geomesa/issues/1272/comments","statuses_url":"https://api.github.com/repos/locationtech/geomesa/statuses/3e2fa188ab9c019232bbd20568c8173a1dbab7cb","head":{"label":"aheyne:fcr_autocomplete","ref":"fcr_autocomplete","sha":"3e2fa188ab9c019232bbd20568c8173a1dbab7cb","user":{"login":"aheyne","id":20668140,"avatar_url":"https://avatars.githubusercontent.com/u/20668140?v=3","gravatar_id":"","url":"https://api.github.com/users/aheyne","html_url":"https://github.com/aheyne","followers_url":"https://api.github.com/users/aheyne/followers","following_url":"https://api.github.com/users/aheyne/following{/other_user}","gists_url":"https://api.github.com/users/aheyne/gists{/gist_id}","starred_url":"https://api.github.com/users/aheyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aheyne/subscriptions","organizations_url":"https://api.github.com/users/aheyne/orgs","repos_url":"https://api.github.com/users/aheyne/repos","events_url":"https://api.github.com/users/aheyne/events{/privacy}","received_events_url":"https://api.github.com/users/aheyne/received_events","type":"User","site_admin":false},"repo":{"id":64691348,"name":"geomesa","full_name":"aheyne/geomesa","owner":{"login":"aheyne","id":20668140,"avatar_url":"https://avatars.githubusercontent.com/u/20668140?v=3","gravatar_id":"","url":"https://api.github.com/users/aheyne","html_url":"https://github.com/aheyne","followers_url":"https://api.github.com/users/aheyne/followers","following_url":"https://api.github.com/users/aheyne/following{/other_user}","gists_url":"https://api.github.com/users/aheyne/gists{/gist_id}","starred_url":"https://api.github.com/users/aheyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aheyne/subscriptions","organizations_url":"https://api.github.com/users/aheyne/orgs","repos_url":"https://api.github.com/users/aheyne/repos","events_url":"https://api.github.com/users/aheyne/events{/privacy}","received_events_url":"https://api.github.com/users/aheyne/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aheyne/geomesa","description":"GeoMesa is a suite of tools for working with big geo-spatial data in a distributed fashion.","fork":true,"url":"https://api.github.com/repos/aheyne/geomesa","forks_url":"https://api.github.com/repos/aheyne/geomesa/forks","keys_url":"https://api.github.com/repos/aheyne/geomesa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aheyne/geomesa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aheyne/geomesa/teams","hooks_url":"https://api.github.com/repos/aheyne/geomesa/hooks","issue_events_url":"https://api.github.com/repos/aheyne/geomesa/issues/events{/number}","events_url":"https://api.github.com/repos/aheyne/geomesa/events","assignees_url":"https://api.github.com/repos/aheyne/geomesa/assignees{/user}","branches_url":"https://api.github.com/repos/aheyne/geomesa/branches{/branch}","tags_url":"https://api.github.com/repos/aheyne/geomesa/tags","blobs_url":"https://api.github.com/repos/aheyne/geomesa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aheyne/geomesa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aheyne/geomesa/git/refs{/sha}","trees_url":"https://api.github.com/repos/aheyne/geomesa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aheyne/geomesa/statuses/{sha}","languages_url":"https://api.github.com/repos/aheyne/geomesa/languages","stargazers_url":"https://api.github.com/repos/aheyne/geomesa/stargazers","contributors_url":"https://api.github.com/repos/aheyne/geomesa/contributors","subscribers_url":"https://api.github.com/repos/aheyne/geomesa/subscribers","subscription_url":"https://api.github.com/repos/aheyne/geomesa/subscription","commits_url":"https://api.github.com/repos/aheyne/geomesa/commits{/sha}","git_commits_url":"https://api.github.com/repos/aheyne/geomesa/git/commits{/sha}","comments_url":"https://api.github.com/repos/aheyne/geomesa/comments{/number}","issue_comment_url":"https://api.github.com/repos/aheyne/geomesa/issues/comments{/number}","contents_url":"https://api.github.com/repos/aheyne/geomesa/contents/{+path}","compare_url":"https://api.github.com/repos/aheyne/geomesa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aheyne/geomesa/merges","archive_url":"https://api.github.com/repos/aheyne/geomesa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aheyne/geomesa/downloads","issues_url":"https://api.github.com/repos/aheyne/geomesa/issues{/number}","pulls_url":"https://api.github.com/repos/aheyne/geomesa/pulls{/number}","milestones_url":"https://api.github.com/repos/aheyne/geomesa/milestones{/number}","notifications_url":"https://api.github.com/repos/aheyne/geomesa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aheyne/geomesa/labels{/name}","releases_url":"https://api.github.com/repos/aheyne/geomesa/releases{/id}","deployments_url":"https://api.github.com/repos/aheyne/geomesa/deployments","created_at":"2016-08-01T18:27:18Z","updated_at":"2016-08-01T18:27:22Z","pushed_at":"2016-12-09T22:02:56Z","git_url":"git://github.com/aheyne/geomesa.git","ssh_url":"git@github.com:aheyne/geomesa.git","clone_url":"https://github.com/aheyne/geomesa.git","svn_url":"https://github.com/aheyne/geomesa","homepage":"https://www.locationtech.org/projects/technology.geomesa","size":38329,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"locationtech:master","ref":"master","sha":"6fd0a64abcaae7f0f22fbbbe38385ec9ee24fe65","user":{"login":"locationtech","id":1991411,"avatar_url":"https://avatars.githubusercontent.com/u/1991411?v=3","gravatar_id":"","url":"https://api.github.com/users/locationtech","html_url":"https://github.com/locationtech","followers_url":"https://api.github.com/users/locationtech/followers","following_url":"https://api.github.com/users/locationtech/following{/other_user}","gists_url":"https://api.github.com/users/locationtech/gists{/gist_id}","starred_url":"https://api.github.com/users/locationtech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/locationtech/subscriptions","organizations_url":"https://api.github.com/users/locationtech/orgs","repos_url":"https://api.github.com/users/locationtech/repos","events_url":"https://api.github.com/users/locationtech/events{/privacy}","received_events_url":"https://api.github.com/users/locationtech/received_events","type":"Organization","site_admin":false},"repo":{"id":13226069,"name":"geomesa","full_name":"locationtech/geomesa","owner":{"login":"locationtech","id":1991411,"avatar_url":"https://avatars.githubusercontent.com/u/1991411?v=3","gravatar_id":"","url":"https://api.github.com/users/locationtech","html_url":"https://github.com/locationtech","followers_url":"https://api.github.com/users/locationtech/followers","following_url":"https://api.github.com/users/locationtech/following{/other_user}","gists_url":"https://api.github.com/users/locationtech/gists{/gist_id}","starred_url":"https://api.github.com/users/locationtech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/locationtech/subscriptions","organizations_url":"https://api.github.com/users/locationtech/orgs","repos_url":"https://api.github.com/users/locationtech/repos","events_url":"https://api.github.com/users/locationtech/events{/privacy}","received_events_url":"https://api.github.com/users/locationtech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/locationtech/geomesa","description":"GeoMesa is a suite of tools for working with big geo-spatial data in a distributed fashion.","fork":false,"url":"https://api.github.com/repos/locationtech/geomesa","forks_url":"https://api.github.com/repos/locationtech/geomesa/forks","keys_url":"https://api.github.com/repos/locationtech/geomesa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/locationtech/geomesa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/locationtech/geomesa/teams","hooks_url":"https://api.github.com/repos/locationtech/geomesa/hooks","issue_events_url":"https://api.github.com/repos/locationtech/geomesa/issues/events{/number}","events_url":"https://api.github.com/repos/locationtech/geomesa/events","assignees_url":"https://api.github.com/repos/locationtech/geomesa/assignees{/user}","branches_url":"https://api.github.com/repos/locationtech/geomesa/branches{/branch}","tags_url":"https://api.github.com/repos/locationtech/geomesa/tags","blobs_url":"https://api.github.com/repos/locationtech/geomesa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/locationtech/geomesa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/locationtech/geomesa/git/refs{/sha}","trees_url":"https://api.github.com/repos/locationtech/geomesa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/locationtech/geomesa/statuses/{sha}","languages_url":"https://api.github.com/repos/locationtech/geomesa/languages","stargazers_url":"https://api.github.com/repos/locationtech/geomesa/stargazers","contributors_url":"https://api.github.com/repos/locationtech/geomesa/contributors","subscribers_url":"https://api.github.com/repos/locationtech/geomesa/subscribers","subscription_url":"https://api.github.com/repos/locationtech/geomesa/subscription","commits_url":"https://api.github.com/repos/locationtech/geomesa/commits{/sha}","git_commits_url":"https://api.github.com/repos/locationtech/geomesa/git/commits{/sha}","comments_url":"https://api.github.com/repos/locationtech/geomesa/comments{/number}","issue_comment_url":"https://api.github.com/repos/locationtech/geomesa/issues/comments{/number}","contents_url":"https://api.github.com/repos/locationtech/geomesa/contents/{+path}","compare_url":"https://api.github.com/repos/locationtech/geomesa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/locationtech/geomesa/merges","archive_url":"https://api.github.com/repos/locationtech/geomesa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/locationtech/geomesa/downloads","issues_url":"https://api.github.com/repos/locationtech/geomesa/issues{/number}","pulls_url":"https://api.github.com/repos/locationtech/geomesa/pulls{/number}","milestones_url":"https://api.github.com/repos/locationtech/geomesa/milestones{/number}","notifications_url":"https://api.github.com/repos/locationtech/geomesa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/locationtech/geomesa/labels{/name}","releases_url":"https://api.github.com/repos/locationtech/geomesa/releases{/id}","deployments_url":"https://api.github.com/repos/locationtech/geomesa/deployments","created_at":"2013-09-30T20:13:46Z","updated_at":"2016-12-09T20:24:16Z","pushed_at":"2016-12-09T22:03:42Z","git_url":"git://github.com/locationtech/geomesa.git","ssh_url":"git@github.com:locationtech/geomesa.git","clone_url":"https://github.com/locationtech/geomesa.git","svn_url":"https://github.com/locationtech/geomesa","homepage":"https://www.locationtech.org/projects/technology.geomesa","size":67245,"stargazers_count":217,"watchers_count":217,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":109,"mirror_url":null,"open_issues_count":19,"forks":109,"open_issues":19,"watchers":217,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/1272"},"html":{"href":"https://github.com/locationtech/geomesa/pull/1272"},"issue":{"href":"https://api.github.com/repos/locationtech/geomesa/issues/1272"},"comments":{"href":"https://api.github.com/repos/locationtech/geomesa/issues/1272/comments"},"review_comments":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/1272/comments"},"review_comment":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/1272/commits"},"statuses":{"href":"https://api.github.com/repos/locationtech/geomesa/statuses/3e2fa188ab9c019232bbd20568c8173a1dbab7cb"}}}}
{"actor":{"display_login":"elahrvivaz"}}