{"action":"created","issue":{"url":"https://api.github.com/repos/cosmo0/commandline/issues/4","labels_url":"https://api.github.com/repos/cosmo0/commandline/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/cosmo0/commandline/issues/4/comments","events_url":"https://api.github.com/repos/cosmo0/commandline/issues/4/events","html_url":"https://github.com/cosmo0/commandline/issues/4","id":58239794,"number":4,"title":"Setting EnableDashDash doesnt seem to work","user":{"login":"Rand-Random","id":9868626,"avatar_url":"https://avatars.githubusercontent.com/u/9868626?v=3","gravatar_id":"","url":"https://api.github.com/users/Rand-Random","html_url":"https://github.com/Rand-Random","followers_url":"https://api.github.com/users/Rand-Random/followers","following_url":"https://api.github.com/users/Rand-Random/following{/other_user}","gists_url":"https://api.github.com/users/Rand-Random/gists{/gist_id}","starred_url":"https://api.github.com/users/Rand-Random/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rand-Random/subscriptions","organizations_url":"https://api.github.com/users/Rand-Random/orgs","repos_url":"https://api.github.com/users/Rand-Random/repos","events_url":"https://api.github.com/users/Rand-Random/events{/privacy}","received_events_url":"https://api.github.com/users/Rand-Random/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-19T17:24:14Z","updated_at":"2015-02-19T17:36:33Z","closed_at":null,"body":"I have the following argument\r\n\r\n            -path \"C:\\foo\\bar.jpg\"\r\n\r\nThe following Options class\r\n\r\n            public class Options\r\n            {\r\n                [Option('p', \"path\")]\r\n                public string Path { get; set; }\r\n            }\r\n\r\nThe following parsing:\r\n\r\n            var parser = new Parser(configuration);\r\n            var parseResult = parser.ParseArguments<Options>(e.Args);\r\n            if (!parseResult.Errors.Any())\r\n            {\r\n                var options = parseResult.Value;\r\n                path = new Uri(options.Path);\r\n            }\r\n\r\nand here the configuration\r\n\r\n        private void configuration(ParserSettings parserSettings)\r\n        {\r\n            parserSettings.CaseSensitive = true;\r\n            parserSettings.EnableDashDash = false;\r\n            parserSettings.IgnoreUnknownArguments = true;\r\n        }\r\n\r\nWhat I get is that in my Options.Path there is only the \"ath\", instead of the \"C:\\foo\\bar.jpg\".\r\n\r\nAlso I would like to know if there is a way to set the settings for the Default Parser (Singleton)?\r\n\r\nHope you can help me out.\r\n"},"comment":{"url":"https://api.github.com/repos/cosmo0/commandline/issues/comments/75098044","html_url":"https://github.com/cosmo0/commandline/issues/4#issuecomment-75098044","issue_url":"https://api.github.com/repos/cosmo0/commandline/issues/4","id":75098044,"user":{"login":"nemec","id":136378,"avatar_url":"https://avatars.githubusercontent.com/u/136378?v=3","gravatar_id":"","url":"https://api.github.com/users/nemec","html_url":"https://github.com/nemec","followers_url":"https://api.github.com/users/nemec/followers","following_url":"https://api.github.com/users/nemec/following{/other_user}","gists_url":"https://api.github.com/users/nemec/gists{/gist_id}","starred_url":"https://api.github.com/users/nemec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nemec/subscriptions","organizations_url":"https://api.github.com/users/nemec/orgs","repos_url":"https://api.github.com/users/nemec/repos","events_url":"https://api.github.com/users/nemec/events{/privacy}","received_events_url":"https://api.github.com/users/nemec/received_events","type":"User","site_admin":false},"created_at":"2015-02-19T17:36:33Z","updated_at":"2015-02-19T17:36:33Z","body":"I think you misunderstand the purpose of the \"EnableDashDash\" setting. If you look at the [summary](https://github.com/gsscoder/commandline/blob/a3fa34f261fe5511f2c8bd7d259f3906b1688e2c/src/CommandLine/ParserSettings.cs#L97) for the setting, it forces all values after a `--` to be parsed as values. For example:\r\n\r\n    myapp.exe -- --path \"C:\\foo\\bar.jpg\"\r\n\r\nWill consist of two positional values \"--path\" and \"C:\\foo\\bar.jpg\" rather than assigning the Path property. This is the same behavior as [getopt](http://www.gnu.org/software/libc/manual/html_node/Using-Getopt.html#Using-Getopt).\r\n\r\nI don't know if you're familiar with getopt, but there are short, single character options set off by a single dash (-p) and long, multicharacter options set off by a double dash (--path). Since short options *must* be one character only, most getopt-style parsers do not require a space token between the option and value (e.g. `-path` is equivalent to `-p ath` or `--path ath`). If you would like the behavior of PowerShell (no distinction between short and long args) you will probably need a different library."}}