{"action":"created","issue":{"url":"https://api.github.com/repos/docopt/docopt.hs/issues/13","labels_url":"https://api.github.com/repos/docopt/docopt.hs/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/docopt/docopt.hs/issues/13/comments","events_url":"https://api.github.com/repos/docopt/docopt.hs/issues/13/events","html_url":"https://github.com/docopt/docopt.hs/issues/13","id":73665553,"number":13,"title":"Help request","user":{"login":"schoettl","id":1301843,"avatar_url":"https://avatars.githubusercontent.com/u/1301843?v=3","gravatar_id":"","url":"https://api.github.com/users/schoettl","html_url":"https://github.com/schoettl","followers_url":"https://api.github.com/users/schoettl/followers","following_url":"https://api.github.com/users/schoettl/following{/other_user}","gists_url":"https://api.github.com/users/schoettl/gists{/gist_id}","starred_url":"https://api.github.com/users/schoettl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schoettl/subscriptions","organizations_url":"https://api.github.com/users/schoettl/orgs","repos_url":"https://api.github.com/users/schoettl/repos","events_url":"https://api.github.com/users/schoettl/events{/privacy}","received_events_url":"https://api.github.com/users/schoettl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-06T16:07:28Z","updated_at":"2015-05-06T19:31:54Z","closed_at":null,"body":"I try for days and don't get it work:\r\n\r\nHow to access an argument of an option (`... --out=file ...`)?\r\n\r\nI copied the first example from [Hackage](https://hackage.haskell.org/package/docopt-0.7.0.1/docs/System-Console-Docopt.html) and added an argument to the option `--caps`. Then I added three lines at the bottom of the `main`.\r\n\r\nI run the program and get an error:\r\n```\r\n$ ./program echo --caps=test hallo\r\nHALLO\r\nargument expected for: Argument \"test\"\r\n\r\n\r\ndocopt-sample version 0.1.0\r\n\r\nUsage:\r\n  docopt-sample cat <file>\r\n  docopt-sample echo [--caps=<test>] <string>\r\n\r\nOptions:\r\n  -c, --caps=<test>    Caps-lock the echoed argument\r\n```\r\n\r\n * [My changes from the Hackage example above](https://github.com/schoettl/computationalgeometry_2/commit/45be04c991eb45ab6527b857fe06f3b9de5caf83)\r\n * [Full code at GitHub](https://github.com/schoettl/computationalgeometry_2/blob/45be04c991eb45ab6527b857fe06f3b9de5caf83/haskell/Main.hs)\r\n\r\nMaybe it's a trivial error and anyone can help me?"},"comment":{"url":"https://api.github.com/repos/docopt/docopt.hs/issues/comments/99581449","html_url":"https://github.com/docopt/docopt.hs/issues/13#issuecomment-99581449","issue_url":"https://api.github.com/repos/docopt/docopt.hs/issues/13","id":99581449,"user":{"login":"schoettl","id":1301843,"avatar_url":"https://avatars.githubusercontent.com/u/1301843?v=3","gravatar_id":"","url":"https://api.github.com/users/schoettl","html_url":"https://github.com/schoettl","followers_url":"https://api.github.com/users/schoettl/followers","following_url":"https://api.github.com/users/schoettl/following{/other_user}","gists_url":"https://api.github.com/users/schoettl/gists{/gist_id}","starred_url":"https://api.github.com/users/schoettl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schoettl/subscriptions","organizations_url":"https://api.github.com/users/schoettl/orgs","repos_url":"https://api.github.com/users/schoettl/repos","events_url":"https://api.github.com/users/schoettl/events{/privacy}","received_events_url":"https://api.github.com/users/schoettl/received_events","type":"User","site_admin":false},"created_at":"2015-05-06T19:31:54Z","updated_at":"2015-05-06T19:31:54Z","body":"Ahh. Thank you!\r\n\r\nIf it is not really trivial to \"treat the `<test>` as a synonym with `--caps`\", it's probably not worth the effort.\r\n\r\nOne problem that can occur, when trying to fix this, are name collisions. Example:\r\n```\r\nusage:\r\n  program [options] FILE\r\noptions:\r\n  --offset N  offset in the file\r\n  --bytes N   number of bytes\r\n  --output FILE  the output file\r\n```\r\nEspecially in large usage messages, this can happen. Sure, the developer can avoid this, but then he really have to read the Docopt documentation! And priorization for this case is not really obvious to a new developer.\r\n\r\nAn example how to use options with arguments in the [README](https://github.com/docopt/docopt.hs/blob/master/README.md) would be great and helpful."}}