{"action":"created","issue":{"url":"https://api.github.com/repos/mlawren/p5-OptArgs/issues/11","labels_url":"https://api.github.com/repos/mlawren/p5-OptArgs/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/mlawren/p5-OptArgs/issues/11/comments","events_url":"https://api.github.com/repos/mlawren/p5-OptArgs/issues/11/events","html_url":"https://github.com/mlawren/p5-OptArgs/issues/11","id":56098840,"number":11,"title":"defining synopsis","user":{"login":"rbonthond","id":70445,"avatar_url":"https://avatars.githubusercontent.com/u/70445?v=3","gravatar_id":"","url":"https://api.github.com/users/rbonthond","html_url":"https://github.com/rbonthond","followers_url":"https://api.github.com/users/rbonthond/followers","following_url":"https://api.github.com/users/rbonthond/following{/other_user}","gists_url":"https://api.github.com/users/rbonthond/gists{/gist_id}","starred_url":"https://api.github.com/users/rbonthond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbonthond/subscriptions","organizations_url":"https://api.github.com/users/rbonthond/orgs","repos_url":"https://api.github.com/users/rbonthond/repos","events_url":"https://api.github.com/users/rbonthond/events{/privacy}","received_events_url":"https://api.github.com/users/rbonthond/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-30T23:24:06Z","updated_at":"2015-02-05T14:54:41Z","closed_at":null,"body":"I'm seeing the following code to display the synopsis, but I'm not able to figure out how to actually set this\r\n\r\n    $usage .= \"\\n  ${grey}Synopsis:$reset\\n    $desc{$caller}\\n\"\r\n      if $ishelp and $desc{$caller};\r\n\r\nWhat do I need to set in my script to get this Synopsis line displayed?"},"comment":{"url":"https://api.github.com/repos/mlawren/p5-OptArgs/issues/comments/73058722","html_url":"https://github.com/mlawren/p5-OptArgs/issues/11#issuecomment-73058722","issue_url":"https://api.github.com/repos/mlawren/p5-OptArgs/issues/11","id":73058722,"user":{"login":"rbonthond","id":70445,"avatar_url":"https://avatars.githubusercontent.com/u/70445?v=3","gravatar_id":"","url":"https://api.github.com/users/rbonthond","html_url":"https://github.com/rbonthond","followers_url":"https://api.github.com/users/rbonthond/followers","following_url":"https://api.github.com/users/rbonthond/following{/other_user}","gists_url":"https://api.github.com/users/rbonthond/gists{/gist_id}","starred_url":"https://api.github.com/users/rbonthond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbonthond/subscriptions","organizations_url":"https://api.github.com/users/rbonthond/orgs","repos_url":"https://api.github.com/users/rbonthond/repos","events_url":"https://api.github.com/users/rbonthond/events{/privacy}","received_events_url":"https://api.github.com/users/rbonthond/received_events","type":"User","site_admin":false},"created_at":"2015-02-05T14:54:41Z","updated_at":"2015-02-05T14:54:41Z","body":"hi,\n\nperhaps something similair to that's done with help?\nopt usage => ( comment => \"synopsis\", hidden =>1, usage =>1 );\n\nrobbin\n\n\nOn Thu, Feb 5, 2015 at 1:43 AM, Mark Lawrence <notifications@github.com>\nwrote:\n\n> Hi Robbin,\n>\n> The Synopsis can only be displayed for sub-commands because there is no\n> way at the moment to set the $desc{$caller} key for the top-level\n> command.\n>\n> The reason why that feature is missing is because I hadn't yet decided\n> how the caller should define the string. For sub-commands the Synopsis\n> string is extracted from the \"comment\" field, but the top-level command\n> doesn't have that to use.\n>\n> Now that I have thought about it a bit I guess I would propose a simple\n> additional function \"synopsis\":\n>\n> use OptArgs;\n>\n> synopsis 'does foo to bar';\n>\n> arg command => (...);\n>\n> opt help => (...);\n>\n> Perhaps it should also be called \"comment\" to make it consistent with\n> the sub-commands... What makes sense to you?\n>\n> In a more general sense, not being able to change the error and/or\n> usage messages should also be classified as a bug or a feature request,\n> depending on one's outlook in life. However the determination of the\n> message elements, and the actual message presentation, are lumped\n> together inside the _usage() function. That function doesn't take any\n> callbacks or export the details in a useful form. Something that I will\n> change for OptArgs2, whenever I start working on it.\n>\n> Cheers,\n> Mark.\n> --\n> Mark Lawrence\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/mlawren/p5-OptArgs/issues/11#issuecomment-73006564>.\n>\n"}}