{"action":"created","comment":{"url":"https://api.github.com/repos/bundler/bundler/pulls/comments/135903898","pull_request_review_id":59371922,"id":135903898,"diff_hunk":"@@ -69,7 +71,26 @@ def self.deprecated_option(*args, &blk)\n     def cli_help\n       version\n       Bundler.ui.info \"\\n\"\n-      self.class.help(shell)\n+\n+      primary_commands = [\"install\", \"update\",\n+                          Bundler.feature_flag.cache_command_is_package? ? \"cache\" : \"package\",\n+                          \"exec\", \"config\", \"help\"]\n+\n+      list = self.class.printable_commands(true)\n+      by_name = list.group_by {|name, _message| name.match(/^bundle (\\w+)/)[1] }\n+      utilities = by_name.keys.sort - primary_commands\n+      primary_commands.map! {|name| (by_name[name] || raise(\"no primary command #{name}\")).first }\n+      utilities.map! {|name| by_name[name].first }\n+\n+      shell.say \"Bundler commands:\\n\\n\"\n+\n+      shell.say \"  Primary commands:\\n\"\n+      shell.print_table(primary_commands, :indent => 4, :truncate => true)\n+      shell.say\n+      shell.say \"  Utilities:\\n\"\n+      shell.print_table(utilities, :indent => 4, :truncate => true)\n+      shell.say\n+      self.class.send(:class_options_help, shell)","path":"lib/bundler/cli.rb","position":33,"original_position":33,"commit_id":"22d55688603ff85ee2a0603b25b37a977abedbbe","original_commit_id":"d1ac350ba4fc67376f50be51c5c470958e71d2a2","user":{"login":"jules2689","id":3074765,"avatar_url":"https://avatars2.githubusercontent.com/u/3074765?v=4","gravatar_id":"","url":"https://api.github.com/users/jules2689","html_url":"https://github.com/jules2689","followers_url":"https://api.github.com/users/jules2689/followers","following_url":"https://api.github.com/users/jules2689/following{/other_user}","gists_url":"https://api.github.com/users/jules2689/gists{/gist_id}","starred_url":"https://api.github.com/users/jules2689/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jules2689/subscriptions","organizations_url":"https://api.github.com/users/jules2689/orgs","repos_url":"https://api.github.com/users/jules2689/repos","events_url":"https://api.github.com/users/jules2689/events{/privacy}","received_events_url":"https://api.github.com/users/jules2689/received_events","type":"User","site_admin":false},"body":"Ah, hrm. You'd think that would be a public thing","created_at":"2017-08-29T20:33:56Z","updated_at":"2017-08-29T20:33:56Z","html_url":"https://github.com/bundler/bundler/pull/5979#discussion_r135903898","pull_request_url":"https://api.github.com/repos/bundler/bundler/pulls/5979","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/bundler/bundler/pulls/comments/135903898"},"html":{"href":"https://github.com/bundler/bundler/pull/5979#discussion_r135903898"},"pull_request":{"href":"https://api.github.com/repos/bundler/bundler/pulls/5979"}},"in_reply_to_id":135813646},"pull_request":{"url":"https://api.github.com/repos/bundler/bundler/pulls/5979","id":138198345,"html_url":"https://github.com/bundler/bundler/pull/5979","diff_url":"https://github.com/bundler/bundler/pull/5979.diff","patch_url":"https://github.com/bundler/bundler/pull/5979.patch","issue_url":"https://api.github.com/repos/bundler/bundler/issues/5979","number":5979,"state":"open","locked":false,"title":"[CLI] Prettify the output in cli_help","user":{"login":"segiddins","id":1946610,"avatar_url":"https://avatars1.githubusercontent.com/u/1946610?v=4","gravatar_id":"","url":"https://api.github.com/users/segiddins","html_url":"https://github.com/segiddins","followers_url":"https://api.github.com/users/segiddins/followers","following_url":"https://api.github.com/users/segiddins/following{/other_user}","gists_url":"https://api.github.com/users/segiddins/gists{/gist_id}","starred_url":"https://api.github.com/users/segiddins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segiddins/subscriptions","organizations_url":"https://api.github.com/users/segiddins/orgs","repos_url":"https://api.github.com/users/segiddins/repos","events_url":"https://api.github.com/users/segiddins/events{/privacy}","received_events_url":"https://api.github.com/users/segiddins/received_events","type":"User","site_admin":false},"body":"### What was the end-user problem that led to this PR?\r\n\r\nThe problem was the new help output for `bundle` was very verbose and unorganized, making it look a bit like work vomit.\r\n\r\n### What was your diagnosis of the problem?\r\n\r\nMy diagnosis was we should \r\n\r\nCloses https://github.com/bundler/bundler/issues/5963.\r\n\r\n### What is your fix for the problem, implemented in this PR?\r\n\r\nMy fix prints the full version info, as well as grouping the commands into `primary` and `utility` as done in the man pages.\r\n\r\n### Why did you choose this fix out of the possible options?\r\n\r\nI chose this fix because it makes the output pleasing to visually parse.\r\n\r\n```\r\n$ bundle\r\nBundler version 1.15.4 (2017-08-25 commit 3203fdd2a)\r\n\r\nBundler commands:\r\n\r\n  Primary commands:\r\n    bundle install [OPTIONS]    # Install the current environment to the system\r\n    bundle update [OPTIONS]     # Update the current environment\r\n    bundle package [OPTIONS]    # Locks and then caches all of the gems into vendor/cache\r\n    bundle exec [OPTIONS]       # Run the command in context of the bundle\r\n    bundle config NAME [VALUE]  # Retrieve or set a configuration value\r\n    bundle help [COMMAND]       # Describe available commands or one specific command\r\n\r\n  Utilities:\r\n    bundle add GEM VERSION         # Add gem to Gemfile and run bundle install\r\n    bundle binstubs GEM [OPTIONS]  # Install the binstubs of the listed gem\r\n    bundle check [OPTIONS]         # Checks if the dependencies listed in Gemfile are satisfied by currently installed gems\r\n    bundle console [GROUP]         # Opens an IRB session with the bundle pre-loaded\r\n    bundle doctor [OPTIONS]        # Checks the bundle for common problems\r\n    bundle env                     # Print information about the environment Bundler is running under\r\n    bundle gem NAME [OPTIONS]      # Creates a skeleton for creating a rubygem\r\n    bundle info GEM [OPTIONS]      # Show information for the given gem\r\n    bundle init [OPTIONS]          # Generates a Gemfile into the current working directory\r\n    bundle issue                   # Learn how to report an issue in Bundler\r\n    bundle licenses                # Prints the license of all gems in the bundle\r\n    bundle lock                    # Creates a lockfile without installing\r\n    bundle open GEM                # Opens the source directory of the given bundled gem\r\n    bundle outdated GEM [OPTIONS]  # List installed gems with newer versions available\r\n    bundle platform [OPTIONS]      # Displays platform compatibility information\r\n    bundle plugin                  # Manage the bundler plugins\r\n    bundle pristine [GEMS...]      # Restores installed gems to pristine condition from files located in the gem cache. Gem installed from a git reposit...\r\n    bundle show GEM [OPTIONS]      # Shows all gems that are part of the bundle, or the path to a given gem\r\n    bundle version                 # Prints the bundler's version information\r\n\r\nOptions:\r\n      [--no-color]                 # Disable colorization in output\r\n  -r, [--retry=NUM]                # Specify the number of times you wish to attempt network commands\r\n  -V, [--verbose], [--no-verbose]  # Enable verbose output mode\r\n```","created_at":"2017-08-29T14:35:35Z","updated_at":"2017-08-29T20:33:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1fadff87c84cd0c01f648ca60ffb3f938611eeb1","assignee":null,"assignees":[],"requested_reviewers":[{"login":"indirect","id":78,"avatar_url":"https://avatars1.githubusercontent.com/u/78?v=4","gravatar_id":"","url":"https://api.github.com/users/indirect","html_url":"https://github.com/indirect","followers_url":"https://api.github.com/users/indirect/followers","following_url":"https://api.github.com/users/indirect/following{/other_user}","gists_url":"https://api.github.com/users/indirect/gists{/gist_id}","starred_url":"https://api.github.com/users/indirect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indirect/subscriptions","organizations_url":"https://api.github.com/users/indirect/orgs","repos_url":"https://api.github.com/users/indirect/repos","events_url":"https://api.github.com/users/indirect/events{/privacy}","received_events_url":"https://api.github.com/users/indirect/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/bundler/bundler/pulls/5979/commits","review_comments_url":"https://api.github.com/repos/bundler/bundler/pulls/5979/comments","review_comment_url":"https://api.github.com/repos/bundler/bundler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bundler/bundler/issues/5979/comments","statuses_url":"https://api.github.com/repos/bundler/bundler/statuses/22d55688603ff85ee2a0603b25b37a977abedbbe","head":{"label":"bundler:seg-pretty-bundle-help","ref":"seg-pretty-bundle-help","sha":"22d55688603ff85ee2a0603b25b37a977abedbbe","user":{"login":"bundler","id":1137638,"avatar_url":"https://avatars0.githubusercontent.com/u/1137638?v=4","gravatar_id":"","url":"https://api.github.com/users/bundler","html_url":"https://github.com/bundler","followers_url":"https://api.github.com/users/bundler/followers","following_url":"https://api.github.com/users/bundler/following{/other_user}","gists_url":"https://api.github.com/users/bundler/gists{/gist_id}","starred_url":"https://api.github.com/users/bundler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bundler/subscriptions","organizations_url":"https://api.github.com/users/bundler/orgs","repos_url":"https://api.github.com/users/bundler/repos","events_url":"https://api.github.com/users/bundler/events{/privacy}","received_events_url":"https://api.github.com/users/bundler/received_events","type":"Organization","site_admin":false},"repo":{"id":488514,"name":"bundler","full_name":"bundler/bundler","owner":{"login":"bundler","id":1137638,"avatar_url":"https://avatars0.githubusercontent.com/u/1137638?v=4","gravatar_id":"","url":"https://api.github.com/users/bundler","html_url":"https://github.com/bundler","followers_url":"https://api.github.com/users/bundler/followers","following_url":"https://api.github.com/users/bundler/following{/other_user}","gists_url":"https://api.github.com/users/bundler/gists{/gist_id}","starred_url":"https://api.github.com/users/bundler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bundler/subscriptions","organizations_url":"https://api.github.com/users/bundler/orgs","repos_url":"https://api.github.com/users/bundler/repos","events_url":"https://api.github.com/users/bundler/events{/privacy}","received_events_url":"https://api.github.com/users/bundler/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bundler/bundler","description":"Manage your Ruby application's gem dependencies","fork":false,"url":"https://api.github.com/repos/bundler/bundler","forks_url":"https://api.github.com/repos/bundler/bundler/forks","keys_url":"https://api.github.com/repos/bundler/bundler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bundler/bundler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bundler/bundler/teams","hooks_url":"https://api.github.com/repos/bundler/bundler/hooks","issue_events_url":"https://api.github.com/repos/bundler/bundler/issues/events{/number}","events_url":"https://api.github.com/repos/bundler/bundler/events","assignees_url":"https://api.github.com/repos/bundler/bundler/assignees{/user}","branches_url":"https://api.github.com/repos/bundler/bundler/branches{/branch}","tags_url":"https://api.github.com/repos/bundler/bundler/tags","blobs_url":"https://api.github.com/repos/bundler/bundler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bundler/bundler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bundler/bundler/git/refs{/sha}","trees_url":"https://api.github.com/repos/bundler/bundler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bundler/bundler/statuses/{sha}","languages_url":"https://api.github.com/repos/bundler/bundler/languages","stargazers_url":"https://api.github.com/repos/bundler/bundler/stargazers","contributors_url":"https://api.github.com/repos/bundler/bundler/contributors","subscribers_url":"https://api.github.com/repos/bundler/bundler/subscribers","subscription_url":"https://api.github.com/repos/bundler/bundler/subscription","commits_url":"https://api.github.com/repos/bundler/bundler/commits{/sha}","git_commits_url":"https://api.github.com/repos/bundler/bundler/git/commits{/sha}","comments_url":"https://api.github.com/repos/bundler/bundler/comments{/number}","issue_comment_url":"https://api.github.com/repos/bundler/bundler/issues/comments{/number}","contents_url":"https://api.github.com/repos/bundler/bundler/contents/{+path}","compare_url":"https://api.github.com/repos/bundler/bundler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bundler/bundler/merges","archive_url":"https://api.github.com/repos/bundler/bundler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bundler/bundler/downloads","issues_url":"https://api.github.com/repos/bundler/bundler/issues{/number}","pulls_url":"https://api.github.com/repos/bundler/bundler/pulls{/number}","milestones_url":"https://api.github.com/repos/bundler/bundler/milestones{/number}","notifications_url":"https://api.github.com/repos/bundler/bundler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bundler/bundler/labels{/name}","releases_url":"https://api.github.com/repos/bundler/bundler/releases{/id}","deployments_url":"https://api.github.com/repos/bundler/bundler/deployments","created_at":"2010-01-26T00:46:38Z","updated_at":"2017-08-29T09:32:46Z","pushed_at":"2017-08-29T20:31:22Z","git_url":"git://github.com/bundler/bundler.git","ssh_url":"git@github.com:bundler/bundler.git","clone_url":"https://github.com/bundler/bundler.git","svn_url":"https://github.com/bundler/bundler","homepage":"https://bundler.io","size":32931,"stargazers_count":3888,"watchers_count":3888,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":1823,"mirror_url":null,"open_issues_count":171,"forks":1823,"open_issues":171,"watchers":3888,"default_branch":"master"}},"base":{"label":"bundler:master","ref":"master","sha":"6ce61e7c6060d1d7a45a131031be472aa25e1d7e","user":{"login":"bundler","id":1137638,"avatar_url":"https://avatars0.githubusercontent.com/u/1137638?v=4","gravatar_id":"","url":"https://api.github.com/users/bundler","html_url":"https://github.com/bundler","followers_url":"https://api.github.com/users/bundler/followers","following_url":"https://api.github.com/users/bundler/following{/other_user}","gists_url":"https://api.github.com/users/bundler/gists{/gist_id}","starred_url":"https://api.github.com/users/bundler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bundler/subscriptions","organizations_url":"https://api.github.com/users/bundler/orgs","repos_url":"https://api.github.com/users/bundler/repos","events_url":"https://api.github.com/users/bundler/events{/privacy}","received_events_url":"https://api.github.com/users/bundler/received_events","type":"Organization","site_admin":false},"repo":{"id":488514,"name":"bundler","full_name":"bundler/bundler","owner":{"login":"bundler","id":1137638,"avatar_url":"https://avatars0.githubusercontent.com/u/1137638?v=4","gravatar_id":"","url":"https://api.github.com/users/bundler","html_url":"https://github.com/bundler","followers_url":"https://api.github.com/users/bundler/followers","following_url":"https://api.github.com/users/bundler/following{/other_user}","gists_url":"https://api.github.com/users/bundler/gists{/gist_id}","starred_url":"https://api.github.com/users/bundler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bundler/subscriptions","organizations_url":"https://api.github.com/users/bundler/orgs","repos_url":"https://api.github.com/users/bundler/repos","events_url":"https://api.github.com/users/bundler/events{/privacy}","received_events_url":"https://api.github.com/users/bundler/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bundler/bundler","description":"Manage your Ruby application's gem dependencies","fork":false,"url":"https://api.github.com/repos/bundler/bundler","forks_url":"https://api.github.com/repos/bundler/bundler/forks","keys_url":"https://api.github.com/repos/bundler/bundler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bundler/bundler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bundler/bundler/teams","hooks_url":"https://api.github.com/repos/bundler/bundler/hooks","issue_events_url":"https://api.github.com/repos/bundler/bundler/issues/events{/number}","events_url":"https://api.github.com/repos/bundler/bundler/events","assignees_url":"https://api.github.com/repos/bundler/bundler/assignees{/user}","branches_url":"https://api.github.com/repos/bundler/bundler/branches{/branch}","tags_url":"https://api.github.com/repos/bundler/bundler/tags","blobs_url":"https://api.github.com/repos/bundler/bundler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bundler/bundler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bundler/bundler/git/refs{/sha}","trees_url":"https://api.github.com/repos/bundler/bundler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bundler/bundler/statuses/{sha}","languages_url":"https://api.github.com/repos/bundler/bundler/languages","stargazers_url":"https://api.github.com/repos/bundler/bundler/stargazers","contributors_url":"https://api.github.com/repos/bundler/bundler/contributors","subscribers_url":"https://api.github.com/repos/bundler/bundler/subscribers","subscription_url":"https://api.github.com/repos/bundler/bundler/subscription","commits_url":"https://api.github.com/repos/bundler/bundler/commits{/sha}","git_commits_url":"https://api.github.com/repos/bundler/bundler/git/commits{/sha}","comments_url":"https://api.github.com/repos/bundler/bundler/comments{/number}","issue_comment_url":"https://api.github.com/repos/bundler/bundler/issues/comments{/number}","contents_url":"https://api.github.com/repos/bundler/bundler/contents/{+path}","compare_url":"https://api.github.com/repos/bundler/bundler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bundler/bundler/merges","archive_url":"https://api.github.com/repos/bundler/bundler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bundler/bundler/downloads","issues_url":"https://api.github.com/repos/bundler/bundler/issues{/number}","pulls_url":"https://api.github.com/repos/bundler/bundler/pulls{/number}","milestones_url":"https://api.github.com/repos/bundler/bundler/milestones{/number}","notifications_url":"https://api.github.com/repos/bundler/bundler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bundler/bundler/labels{/name}","releases_url":"https://api.github.com/repos/bundler/bundler/releases{/id}","deployments_url":"https://api.github.com/repos/bundler/bundler/deployments","created_at":"2010-01-26T00:46:38Z","updated_at":"2017-08-29T09:32:46Z","pushed_at":"2017-08-29T20:31:22Z","git_url":"git://github.com/bundler/bundler.git","ssh_url":"git@github.com:bundler/bundler.git","clone_url":"https://github.com/bundler/bundler.git","svn_url":"https://github.com/bundler/bundler","homepage":"https://bundler.io","size":32931,"stargazers_count":3888,"watchers_count":3888,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":1823,"mirror_url":null,"open_issues_count":171,"forks":1823,"open_issues":171,"watchers":3888,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bundler/bundler/pulls/5979"},"html":{"href":"https://github.com/bundler/bundler/pull/5979"},"issue":{"href":"https://api.github.com/repos/bundler/bundler/issues/5979"},"comments":{"href":"https://api.github.com/repos/bundler/bundler/issues/5979/comments"},"review_comments":{"href":"https://api.github.com/repos/bundler/bundler/pulls/5979/comments"},"review_comment":{"href":"https://api.github.com/repos/bundler/bundler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bundler/bundler/pulls/5979/commits"},"statuses":{"href":"https://api.github.com/repos/bundler/bundler/statuses/22d55688603ff85ee2a0603b25b37a977abedbbe"}},"author_association":"OWNER"}}
{"actor":{"display_login":"jules2689"}}