{"action":"created","issue":{"url":"https://api.github.com/repos/lihaoyi/Ammonite/issues/423","repository_url":"https://api.github.com/repos/lihaoyi/Ammonite","labels_url":"https://api.github.com/repos/lihaoyi/Ammonite/issues/423/labels{/name}","comments_url":"https://api.github.com/repos/lihaoyi/Ammonite/issues/423/comments","events_url":"https://api.github.com/repos/lihaoyi/Ammonite/issues/423/events","html_url":"https://github.com/lihaoyi/Ammonite/issues/423","id":168745056,"number":423,"title":"Use custom argument parser with ammonite","user":{"login":"benwbooth","id":75972,"avatar_url":"https://avatars.githubusercontent.com/u/75972?v=3","gravatar_id":"","url":"https://api.github.com/users/benwbooth","html_url":"https://github.com/benwbooth","followers_url":"https://api.github.com/users/benwbooth/followers","following_url":"https://api.github.com/users/benwbooth/following{/other_user}","gists_url":"https://api.github.com/users/benwbooth/gists{/gist_id}","starred_url":"https://api.github.com/users/benwbooth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benwbooth/subscriptions","organizations_url":"https://api.github.com/users/benwbooth/orgs","repos_url":"https://api.github.com/users/benwbooth/repos","events_url":"https://api.github.com/users/benwbooth/events{/privacy}","received_events_url":"https://api.github.com/users/benwbooth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lihaoyi/Ammonite/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-01T21:19:52Z","updated_at":"2016-08-17T03:16:02Z","closed_at":null,"body":"I would like to be able to use a custom argument parser with ammonite instead of the built in one. How can I achieve this? Is there some way to access the command line arguments directly from the script without needing to use the `@main` annotation? It would be nice if there were an annotation like this:\r\n\r\n`@args val args: Seq[String] = null`\r\n\r\nor maybe:\r\n\r\n`val args: Seq[String] = ammonite.main.Scripts.args`\r\n\r\nwhich automatically filled in the command line arguments to a variable. This would also enable users to not have to provide a `@main` function in their scripts. Is this possible to achieve?\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/lihaoyi/Ammonite/issues/comments/240302797","html_url":"https://github.com/lihaoyi/Ammonite/issues/423#issuecomment-240302797","issue_url":"https://api.github.com/repos/lihaoyi/Ammonite/issues/423","id":240302797,"user":{"login":"lihaoyi","id":934140,"avatar_url":"https://avatars.githubusercontent.com/u/934140?v=3","gravatar_id":"","url":"https://api.github.com/users/lihaoyi","html_url":"https://github.com/lihaoyi","followers_url":"https://api.github.com/users/lihaoyi/followers","following_url":"https://api.github.com/users/lihaoyi/following{/other_user}","gists_url":"https://api.github.com/users/lihaoyi/gists{/gist_id}","starred_url":"https://api.github.com/users/lihaoyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lihaoyi/subscriptions","organizations_url":"https://api.github.com/users/lihaoyi/orgs","repos_url":"https://api.github.com/users/lihaoyi/repos","events_url":"https://api.github.com/users/lihaoyi/events{/privacy}","received_events_url":"https://api.github.com/users/lihaoyi/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T03:16:02Z","updated_at":"2016-08-17T03:16:02Z","body":"Fixed by https://github.com/lihaoyi/Ammonite/commit/7608d6f726fd05256f03e237a49ea20b69887502; this allows you to take `String*` arguments in your `@main` methods, which will then take in all kinds of sets of arguments un-changed that you can then feed into whatever argument parser you want"}}
{"actor":{"display_login":"lihaoyi"}}