{"action":"created","comment":{"url":"https://api.github.com/repos/fastlane/fastlane/pulls/comments/58908426","id":58908426,"diff_hunk":"@@ -0,0 +1,24 @@\n+require 'fileutils'\n+\n+module Fastlane\n+  # Enable tab auto completion\n+  class AutoComplete\n+    def self.execute\n+      fastlane_conf_dir = \"~/.fastlane\"\n+      confirm = UI.confirm \"This will copy a shell script into #{fastlane_conf_dir} that provides the command tab completion. Sound good?\"\n+      return unless confirm\n+\n+      # create the ~/.fastlane directory\n+      fastlane_conf_dir = File.expand_path fastlane_conf_dir\n+      FileUtils.mkdir_p fastlane_conf_dir\n+\n+      # then copy all of the completions files into it from the gem\n+      completion_script_path = File.join(Fastlane::Helper.gem_path('fastlane'), 'lib', 'assets', 'completions')\n+      `cp -r #{completion_script_path} #{fastlane_conf_dir}`\n+\n+      UI.success \"Copied! To use auto complete for fastlane, add the following line to your favorite rc file (e.g. ~/.bashrc)\"\n+      UI.important \"  . ~/.fastlane/completions/completion.sh\"\n+      UI.success \"Don't forget to source that file in your current shell! 🐚\"","path":"fastlane/lib/fastlane/auto_complete.rb","position":21,"original_position":21,"commit_id":"767f4e26c55ea3541dbf5e7c96b9fab81e8f169a","original_commit_id":"767f4e26c55ea3541dbf5e7c96b9fab81e8f169a","user":{"login":"KrauseFx","id":869950,"avatar_url":"https://avatars.githubusercontent.com/u/869950?v=3","gravatar_id":"","url":"https://api.github.com/users/KrauseFx","html_url":"https://github.com/KrauseFx","followers_url":"https://api.github.com/users/KrauseFx/followers","following_url":"https://api.github.com/users/KrauseFx/following{/other_user}","gists_url":"https://api.github.com/users/KrauseFx/gists{/gist_id}","starred_url":"https://api.github.com/users/KrauseFx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrauseFx/subscriptions","organizations_url":"https://api.github.com/users/KrauseFx/orgs","repos_url":"https://api.github.com/users/KrauseFx/repos","events_url":"https://api.github.com/users/KrauseFx/events{/privacy}","received_events_url":"https://api.github.com/users/KrauseFx/received_events","type":"User","site_admin":false},"body":"Why not just show the command at this point?\r\n```ruby\r\nUI.command(\"source ~/.fastlane/completions/completion.sh\")\r\n```","created_at":"2016-04-07T17:10:39Z","updated_at":"2016-04-07T17:10:39Z","html_url":"https://github.com/fastlane/fastlane/pull/4090#discussion_r58908426","pull_request_url":"https://api.github.com/repos/fastlane/fastlane/pulls/4090","_links":{"self":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/comments/58908426"},"html":{"href":"https://github.com/fastlane/fastlane/pull/4090#discussion_r58908426"},"pull_request":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/4090"}}},"pull_request":{"url":"https://api.github.com/repos/fastlane/fastlane/pulls/4090","id":65536558,"html_url":"https://github.com/fastlane/fastlane/pull/4090","diff_url":"https://github.com/fastlane/fastlane/pull/4090.diff","patch_url":"https://github.com/fastlane/fastlane/pull/4090.patch","issue_url":"https://api.github.com/repos/fastlane/fastlane/issues/4090","number":4090,"state":"open","locked":false,"title":"Adds tab completing for fastlane lane names","user":{"login":"asfalcone","id":1848683,"avatar_url":"https://avatars.githubusercontent.com/u/1848683?v=3","gravatar_id":"","url":"https://api.github.com/users/asfalcone","html_url":"https://github.com/asfalcone","followers_url":"https://api.github.com/users/asfalcone/followers","following_url":"https://api.github.com/users/asfalcone/following{/other_user}","gists_url":"https://api.github.com/users/asfalcone/gists{/gist_id}","starred_url":"https://api.github.com/users/asfalcone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asfalcone/subscriptions","organizations_url":"https://api.github.com/users/asfalcone/orgs","repos_url":"https://api.github.com/users/asfalcone/repos","events_url":"https://api.github.com/users/asfalcone/events{/privacy}","received_events_url":"https://api.github.com/users/asfalcone/received_events","type":"User","site_admin":false},"body":"Adds bash and zsh tab completion for fastlane lane names\r\n\r\nTo enable:\r\n```\r\nfastlane enable_auto_complete\r\n```\r\nAnd follow the on screen prompt to add a line to your bash/zsh profile\r\n\r\nThen `fastlane <tab>` to use it! \r\n\r\n![image](https://cloud.githubusercontent.com/assets/1848683/14332918/eeb926e8-fc19-11e5-88fe-18a8fc3bdcaa.png)\r\n\r\ncreated with help from @mlbileschi :shell: ","created_at":"2016-04-06T21:08:31Z","updated_at":"2016-04-07T17:10:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ad4e35da7302a16711bd649e973478523970ded","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fastlane/fastlane/pulls/4090/commits","review_comments_url":"https://api.github.com/repos/fastlane/fastlane/pulls/4090/comments","review_comment_url":"https://api.github.com/repos/fastlane/fastlane/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fastlane/fastlane/issues/4090/comments","statuses_url":"https://api.github.com/repos/fastlane/fastlane/statuses/767f4e26c55ea3541dbf5e7c96b9fab81e8f169a","head":{"label":"fastlane:fastlane-auto-complete","ref":"fastlane-auto-complete","sha":"767f4e26c55ea3541dbf5e7c96b9fab81e8f169a","user":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"repo":{"id":27442967,"name":"fastlane","full_name":"fastlane/fastlane","owner":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fastlane/fastlane","description":"Connect all iOS and Android deployment tools into one streamlined workflow","fork":false,"url":"https://api.github.com/repos/fastlane/fastlane","forks_url":"https://api.github.com/repos/fastlane/fastlane/forks","keys_url":"https://api.github.com/repos/fastlane/fastlane/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fastlane/fastlane/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fastlane/fastlane/teams","hooks_url":"https://api.github.com/repos/fastlane/fastlane/hooks","issue_events_url":"https://api.github.com/repos/fastlane/fastlane/issues/events{/number}","events_url":"https://api.github.com/repos/fastlane/fastlane/events","assignees_url":"https://api.github.com/repos/fastlane/fastlane/assignees{/user}","branches_url":"https://api.github.com/repos/fastlane/fastlane/branches{/branch}","tags_url":"https://api.github.com/repos/fastlane/fastlane/tags","blobs_url":"https://api.github.com/repos/fastlane/fastlane/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fastlane/fastlane/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fastlane/fastlane/git/refs{/sha}","trees_url":"https://api.github.com/repos/fastlane/fastlane/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fastlane/fastlane/statuses/{sha}","languages_url":"https://api.github.com/repos/fastlane/fastlane/languages","stargazers_url":"https://api.github.com/repos/fastlane/fastlane/stargazers","contributors_url":"https://api.github.com/repos/fastlane/fastlane/contributors","subscribers_url":"https://api.github.com/repos/fastlane/fastlane/subscribers","subscription_url":"https://api.github.com/repos/fastlane/fastlane/subscription","commits_url":"https://api.github.com/repos/fastlane/fastlane/commits{/sha}","git_commits_url":"https://api.github.com/repos/fastlane/fastlane/git/commits{/sha}","comments_url":"https://api.github.com/repos/fastlane/fastlane/comments{/number}","issue_comment_url":"https://api.github.com/repos/fastlane/fastlane/issues/comments{/number}","contents_url":"https://api.github.com/repos/fastlane/fastlane/contents/{+path}","compare_url":"https://api.github.com/repos/fastlane/fastlane/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fastlane/fastlane/merges","archive_url":"https://api.github.com/repos/fastlane/fastlane/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fastlane/fastlane/downloads","issues_url":"https://api.github.com/repos/fastlane/fastlane/issues{/number}","pulls_url":"https://api.github.com/repos/fastlane/fastlane/pulls{/number}","milestones_url":"https://api.github.com/repos/fastlane/fastlane/milestones{/number}","notifications_url":"https://api.github.com/repos/fastlane/fastlane/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fastlane/fastlane/labels{/name}","releases_url":"https://api.github.com/repos/fastlane/fastlane/releases{/id}","deployments_url":"https://api.github.com/repos/fastlane/fastlane/deployments","created_at":"2014-12-02T17:00:38Z","updated_at":"2016-04-07T16:33:23Z","pushed_at":"2016-04-07T17:00:59Z","git_url":"git://github.com/fastlane/fastlane.git","ssh_url":"git@github.com:fastlane/fastlane.git","clone_url":"https://github.com/fastlane/fastlane.git","svn_url":"https://github.com/fastlane/fastlane","homepage":"https://fastlane.tools","size":55064,"stargazers_count":6905,"watchers_count":6905,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":872,"mirror_url":null,"open_issues_count":732,"forks":872,"open_issues":732,"watchers":6905,"default_branch":"master"}},"base":{"label":"fastlane:master","ref":"master","sha":"45200985c0c806a7336a75a14507782309397997","user":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"repo":{"id":27442967,"name":"fastlane","full_name":"fastlane/fastlane","owner":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fastlane/fastlane","description":"Connect all iOS and Android deployment tools into one streamlined workflow","fork":false,"url":"https://api.github.com/repos/fastlane/fastlane","forks_url":"https://api.github.com/repos/fastlane/fastlane/forks","keys_url":"https://api.github.com/repos/fastlane/fastlane/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fastlane/fastlane/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fastlane/fastlane/teams","hooks_url":"https://api.github.com/repos/fastlane/fastlane/hooks","issue_events_url":"https://api.github.com/repos/fastlane/fastlane/issues/events{/number}","events_url":"https://api.github.com/repos/fastlane/fastlane/events","assignees_url":"https://api.github.com/repos/fastlane/fastlane/assignees{/user}","branches_url":"https://api.github.com/repos/fastlane/fastlane/branches{/branch}","tags_url":"https://api.github.com/repos/fastlane/fastlane/tags","blobs_url":"https://api.github.com/repos/fastlane/fastlane/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fastlane/fastlane/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fastlane/fastlane/git/refs{/sha}","trees_url":"https://api.github.com/repos/fastlane/fastlane/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fastlane/fastlane/statuses/{sha}","languages_url":"https://api.github.com/repos/fastlane/fastlane/languages","stargazers_url":"https://api.github.com/repos/fastlane/fastlane/stargazers","contributors_url":"https://api.github.com/repos/fastlane/fastlane/contributors","subscribers_url":"https://api.github.com/repos/fastlane/fastlane/subscribers","subscription_url":"https://api.github.com/repos/fastlane/fastlane/subscription","commits_url":"https://api.github.com/repos/fastlane/fastlane/commits{/sha}","git_commits_url":"https://api.github.com/repos/fastlane/fastlane/git/commits{/sha}","comments_url":"https://api.github.com/repos/fastlane/fastlane/comments{/number}","issue_comment_url":"https://api.github.com/repos/fastlane/fastlane/issues/comments{/number}","contents_url":"https://api.github.com/repos/fastlane/fastlane/contents/{+path}","compare_url":"https://api.github.com/repos/fastlane/fastlane/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fastlane/fastlane/merges","archive_url":"https://api.github.com/repos/fastlane/fastlane/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fastlane/fastlane/downloads","issues_url":"https://api.github.com/repos/fastlane/fastlane/issues{/number}","pulls_url":"https://api.github.com/repos/fastlane/fastlane/pulls{/number}","milestones_url":"https://api.github.com/repos/fastlane/fastlane/milestones{/number}","notifications_url":"https://api.github.com/repos/fastlane/fastlane/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fastlane/fastlane/labels{/name}","releases_url":"https://api.github.com/repos/fastlane/fastlane/releases{/id}","deployments_url":"https://api.github.com/repos/fastlane/fastlane/deployments","created_at":"2014-12-02T17:00:38Z","updated_at":"2016-04-07T16:33:23Z","pushed_at":"2016-04-07T17:00:59Z","git_url":"git://github.com/fastlane/fastlane.git","ssh_url":"git@github.com:fastlane/fastlane.git","clone_url":"https://github.com/fastlane/fastlane.git","svn_url":"https://github.com/fastlane/fastlane","homepage":"https://fastlane.tools","size":55064,"stargazers_count":6905,"watchers_count":6905,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":872,"mirror_url":null,"open_issues_count":732,"forks":872,"open_issues":732,"watchers":6905,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/4090"},"html":{"href":"https://github.com/fastlane/fastlane/pull/4090"},"issue":{"href":"https://api.github.com/repos/fastlane/fastlane/issues/4090"},"comments":{"href":"https://api.github.com/repos/fastlane/fastlane/issues/4090/comments"},"review_comments":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/4090/comments"},"review_comment":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/4090/commits"},"statuses":{"href":"https://api.github.com/repos/fastlane/fastlane/statuses/767f4e26c55ea3541dbf5e7c96b9fab81e8f169a"}}}}