{"action":"created","issue":{"url":"https://api.github.com/repos/tucnak/climax/issues/3","labels_url":"https://api.github.com/repos/tucnak/climax/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/tucnak/climax/issues/3/comments","events_url":"https://api.github.com/repos/tucnak/climax/issues/3/events","html_url":"https://github.com/tucnak/climax/pull/3","id":116205975,"number":3,"title":"Introduce (optional) categories to group subcommands","user":{"login":"sahib","id":376651,"avatar_url":"https://avatars.githubusercontent.com/u/376651?v=3","gravatar_id":"","url":"https://api.github.com/users/sahib","html_url":"https://github.com/sahib","followers_url":"https://api.github.com/users/sahib/followers","following_url":"https://api.github.com/users/sahib/following{/other_user}","gists_url":"https://api.github.com/users/sahib/gists{/gist_id}","starred_url":"https://api.github.com/users/sahib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahib/subscriptions","organizations_url":"https://api.github.com/users/sahib/orgs","repos_url":"https://api.github.com/users/sahib/repos","events_url":"https://api.github.com/users/sahib/events{/privacy}","received_events_url":"https://api.github.com/users/sahib/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tucnak/climax/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-11-10T21:28:48Z","updated_at":"2015-11-11T22:32:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tucnak/climax/pulls/3","html_url":"https://github.com/tucnak/climax/pull/3","diff_url":"https://github.com/tucnak/climax/pull/3.diff","patch_url":"https://github.com/tucnak/climax/pull/3.patch"},"body":"For some larger programs it's sometimes useful to group commands into categories.\r\nThis patch should not alter normal output, but when filling out ```Command.Category```,\r\nit will be grouped accordingly.\r\n\r\nHere's an example from ipfs:\r\n\r\n```USAGE:\r\n\r\n    ipfs - global p2p merkle-dag filesystem\r\n\r\n    ipfs [<flags>] <command> [<arg>] ...\r\n\r\n    BASIC COMMANDS\r\n    \r\n        init          Initialize ipfs local configuration\r\n        add <path>    Add an object to ipfs\r\n        cat <ref>     Show ipfs object data\r\n        get <ref>     Download ipfs objects\r\n        ls <ref>      List links from an object\r\n        refs <ref>    List hashes of links from an object\r\n    \r\n    DATA STRUCTURE COMMANDS\r\n    \r\n        block         Interact with raw blocks in the datastore\r\n        object        Interact with raw dag nodes\r\n        file          Interact with Unix filesystem objects\r\n    \r\n    ADVANCED COMMANDS\r\n    \r\n        daemon        Start a long-running daemon process\r\n        mount         Mount an ipfs read-only mountpoint\r\n        resolve       Resolve any type of name\r\n        name          Publish or resolve IPNS names\r\n        dns           Resolve DNS links\r\n        pin           Pin objects to local storage\r\n        repo gc       Garbage collect unpinned objects\r\n    \r\n    NETWORK COMMANDS\r\n    \r\n        id            Show info about ipfs peers\r\n        bootstrap     Add or remove bootstrap peers\r\n        swarm         Manage connections to the p2p network\r\n        dht           Query the dht for values or peers\r\n        ping          Measure the latency of a connection\r\n        diag          Print diagnostics\r\n    \r\n    TOOL COMMANDS\r\n    \r\n        config        Manage configuration\r\n        version       Show ipfs version information\r\n        update        Download and apply go-ipfs updates\r\n        commands      List all available commands\r\n```"},"comment":{"url":"https://api.github.com/repos/tucnak/climax/issues/comments/155930351","html_url":"https://github.com/tucnak/climax/pull/3#issuecomment-155930351","issue_url":"https://api.github.com/repos/tucnak/climax/issues/3","id":155930351,"user":{"login":"sahib","id":376651,"avatar_url":"https://avatars.githubusercontent.com/u/376651?v=3","gravatar_id":"","url":"https://api.github.com/users/sahib","html_url":"https://github.com/sahib","followers_url":"https://api.github.com/users/sahib/followers","following_url":"https://api.github.com/users/sahib/following{/other_user}","gists_url":"https://api.github.com/users/sahib/gists{/gist_id}","starred_url":"https://api.github.com/users/sahib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahib/subscriptions","organizations_url":"https://api.github.com/users/sahib/orgs","repos_url":"https://api.github.com/users/sahib/repos","events_url":"https://api.github.com/users/sahib/events{/privacy}","received_events_url":"https://api.github.com/users/sahib/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T22:32:14Z","updated_at":"2015-11-11T22:32:14Z","body":"I added the patch to my pull request and fixed the tests in the same run.\r\n(Sorry for the merge commit, had to do since the patch was not based on the most recent commit).\r\n\r\n*Regarding caps:* I guess that's a bit subjective - I like the look, since it separates the groups nicely.\r\nI would be okay too without caps, but left-align the group headers for visual separation (just a ``#`` feels too weak for me). Therefore my proposal was to leave formatting to the user's liking.\r\n\r\n(Current PR includes the version with no formatting (like ``<tab>#``) pre-defined)."}}