{"action":"opened","issue":{"url":"https://api.github.com/repos/urfave/cli/issues/533","repository_url":"https://api.github.com/repos/urfave/cli","labels_url":"https://api.github.com/repos/urfave/cli/issues/533/labels{/name}","comments_url":"https://api.github.com/repos/urfave/cli/issues/533/comments","events_url":"https://api.github.com/repos/urfave/cli/issues/533/events","html_url":"https://github.com/urfave/cli/issues/533","id":176975189,"number":533,"title":"Options after arguments are ignored","user":{"login":"noffle","id":489362,"avatar_url":"https://avatars.githubusercontent.com/u/489362?v=3","gravatar_id":"","url":"https://api.github.com/users/noffle","html_url":"https://github.com/noffle","followers_url":"https://api.github.com/users/noffle/followers","following_url":"https://api.github.com/users/noffle/following{/other_user}","gists_url":"https://api.github.com/users/noffle/gists{/gist_id}","starred_url":"https://api.github.com/users/noffle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noffle/subscriptions","organizations_url":"https://api.github.com/users/noffle/orgs","repos_url":"https://api.github.com/users/noffle/repos","events_url":"https://api.github.com/users/noffle/events{/privacy}","received_events_url":"https://api.github.com/users/noffle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-14T17:51:59Z","updated_at":"2016-09-14T17:51:59Z","closed_at":null,"body":"Consider the following example, which is one of the README examples that has been slightly modified:\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"fmt\"\r\n\t\"os\"\r\n\r\n\t\"github.com/urfave/cli\"\r\n)\r\n\r\nfunc main() {\r\n\tapp := cli.NewApp()\r\n\r\n\tapp.Flags = []cli.Flag{\r\n\t\tcli.StringFlag{\r\n\t\t\tName:  \"lang\",\r\n\t\t\tValue: \"english\",\r\n\t\t\tUsage: \"language for the greeting\",\r\n\t\t},\r\n\t}\r\n\r\n\tapp.Action = func(c *cli.Context) error {\r\n\t\tfmt.Println(c.String(\"lang\"))\r\n\t\treturn nil\r\n\t}\r\n\r\n\tapp.Run(os.Args)\r\n}\r\n```\r\n\r\nAnd the following invocations:\r\n\r\n```sh\r\n$ ./cli-test --lang spanish\r\nspanish\r\n\r\n$ ./cli-test foo --lang spanish\r\nenglish\r\n```\r\n\r\nIn the second invocation, the `lang` option is ignored.\r\n\r\nThis may have been by design, but it makes the library unable to handle `wget`-like invocations of e.g. `wget http://foo.bar/index.html -o file.html` where the options act like operators on the argument(s)."}}
{"actor":{"display_login":"noffle"}}