{"push_id":2381496416,"size":25,"distinct_size":23,"ref":"refs/heads/master","head":"f8dd93c939e9329c56ece466462cd05662c446d6","before":"04098fd38718876cfd7d8ba200a9b60e19be14b8","commits":[{"sha":"19f425eafaec98ee010e0c997398cbdaaf583f95","author":{"name":"Matthias Krüger","email":"bd69680cda48d5cf02cb49b1497600d10c542512@famsik.de"},"message":"Cargo.toml: use codegen-units = 1 in release and bench profiles.","distinct":false,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/19f425eafaec98ee010e0c997398cbdaaf583f95"},{"sha":"42407d7f21d794103cda61f49d2615aae0a4bcd9","author":{"name":"Matthias Krüger","email":"bd69680cda48d5cf02cb49b1497600d10c542512@famsik.de"},"message":"docs(CONTRIBUTING.md): fix url to clippy upstream repo to point to https://github.com/rust-lang-nursery/rust-clippy instead of https://github.com/Manishearth/rust-clippy","distinct":false,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/42407d7f21d794103cda61f49d2615aae0a4bcd9"},{"sha":"916fe8d01880cfc40675ae53335843062a499a55","author":{"name":"Kevin K","email":"21ce87ad32d444909f317a97166449d6aad0e545@gmail.com"},"message":"Merge pull request #1193 from matthiaskrgr/readme\n\ndocs(CONTRIBUTING.md): fix url to clippy upstream repo to point to rust-lang-nursery/rust-clippy","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/916fe8d01880cfc40675ae53335843062a499a55"},{"sha":"fc7ab22713f956ff75cccef27061593842c2ac2b","author":{"name":"Katharina","email":"31d406c9789dc7ae1a7c428ea96dd7c4564c7d15@spacekookie.de"},"message":"Hinting that \"wrap_help\" is a thing","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/fc7ab22713f956ff75cccef27061593842c2ac2b"},{"sha":"1a7933741fb66302e4a7d2b9772076ea7e9ca6e6","author":{"name":"Katharina","email":"31d406c9789dc7ae1a7c428ea96dd7c4564c7d15@spacekookie.de"},"message":"Moving the line into the apropriate section","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/1a7933741fb66302e4a7d2b9772076ea7e9ca6e6"},{"sha":"3b02b106a1c3f6dab2abb84aafa80c7bd8a4c507","author":{"name":"Kevin K","email":"21ce87ad32d444909f317a97166449d6aad0e545@gmail.com"},"message":"Merge pull request #1195 from spacekookie/patch-1\n\nHinting that \"wrap_help\" is a thing","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/3b02b106a1c3f6dab2abb84aafa80c7bd8a4c507"},{"sha":"cd046a791def62021fdd84bb8cd0947f352bb739","author":{"name":"Kevin K","email":"21ce87ad32d444909f317a97166449d6aad0e545@gmail.com"},"message":"Merge pull request #1192 from matthiaskrgr/CGUs\n\nCargo.toml: use codegen-units = 1 in release and bench profiles.","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/cd046a791def62021fdd84bb8cd0947f352bb739"},{"sha":"fe3052a4fde1f7271200ba0cc2dfbbff2ac86bec","author":{"name":"Bruce Mitchener","email":"786feb13c1bbb2ddf2c6aeff1da87b1e9591edb4@gmail.com"},"message":"chore: Update to ansi_term 0.11\n\nThis fixes some markdown warnings when building the documentation.","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/fe3052a4fde1f7271200ba0cc2dfbbff2ac86bec"},{"sha":"935ba0dd547a69c3f636c5486795012019408794","author":{"name":"Bruce Mitchener","email":"786feb13c1bbb2ddf2c6aeff1da87b1e9591edb4@gmail.com"},"message":"docs: Fix some typos and markdown issues.","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/935ba0dd547a69c3f636c5486795012019408794"},{"sha":"154b3f4dc7e1c5f49f5c5f9450ce4254aab084b9","author":{"name":"Kevin K","email":"21ce87ad32d444909f317a97166449d6aad0e545@gmail.com"},"message":"Merge pull request #1199 from waywardmonkeys/update-ansi-term\n\nchore: Update to ansi_term 0.11","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/154b3f4dc7e1c5f49f5c5f9450ce4254aab084b9"},{"sha":"7b1b6814f8ccd73b59d2b9a66342a45784bc7aa9","author":{"name":"Kevin K","email":"21ce87ad32d444909f317a97166449d6aad0e545@gmail.com"},"message":"Merge pull request #1200 from waywardmonkeys/fix-some-typos\n\nFix some typos and markdown issues.","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/7b1b6814f8ccd73b59d2b9a66342a45784bc7aa9"},{"sha":"0b5b312686eceacab8e7c03459025a8e5663143e","author":{"name":"Kevin K","email":"21ce87ad32d444909f317a97166449d6aad0e545@gmail.com"},"message":"tests: adds tests for querying indices","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/0b5b312686eceacab8e7c03459025a8e5663143e"},{"sha":"50bc00477afa64dc6cdc5de161d3de3ba1d105a7","author":{"name":"Kevin K","email":"21ce87ad32d444909f317a97166449d6aad0e545@gmail.com"},"message":"docs(Arg Indices): adds the documentation for the arg index querying methods","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/50bc00477afa64dc6cdc5de161d3de3ba1d105a7"},{"sha":"c4c414e470fa36cd70c89883766fc2e260f19843","author":{"name":"Kevin K","email":"21ce87ad32d444909f317a97166449d6aad0e545@gmail.com"},"message":"tests(Values): moves values tests into a tests mod","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/c4c414e470fa36cd70c89883766fc2e260f19843"},{"sha":"1e67be44f0ccf161cc84c4e6082382072e89c302","author":{"name":"Kevin K","email":"21ce87ad32d444909f317a97166449d6aad0e545@gmail.com"},"message":"feat(Indices): implements an Indices<Item=&usize> iterator","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/1e67be44f0ccf161cc84c4e6082382072e89c302"},{"sha":"74075d65e8db1ddb5e2a4558009a5729d749d1b6","author":{"name":"Kevin K","email":"21ce87ad32d444909f317a97166449d6aad0e545@gmail.com"},"message":"docs(Values): improves the docs example of the Values iterator","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/74075d65e8db1ddb5e2a4558009a5729d749d1b6"},{"sha":"89cdbebaa01da4da39aa0f0be78870b587539c67","author":{"name":"Kevin K","email":"21ce87ad32d444909f317a97166449d6aad0e545@gmail.com"},"message":"fixup! tests: adds tests for querying indices","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/89cdbebaa01da4da39aa0f0be78870b587539c67"},{"sha":"47ade6c7e4338bc3fa18aadfcf96eb7e01e0f655","author":{"name":"Kevin K","email":"21ce87ad32d444909f317a97166449d6aad0e545@gmail.com"},"message":"fixup! docs(Arg Indices): adds the documentation for the arg index querying methods","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/47ade6c7e4338bc3fa18aadfcf96eb7e01e0f655"},{"sha":"f58d05767ec8133c8eb2de117cb642b9ae29ccbc","author":{"name":"Kevin K","email":"21ce87ad32d444909f317a97166449d6aad0e545@gmail.com"},"message":"feat(Arg Indices): adds the ability to query argument value indices\n\nAdds the abiltiy to query the matches struct for the indices of values or flags. The index\nis similar to that of an argv index, but not exactly a 1:1.\n\nFor flags (i.e. those arguments which don't have an associated value), indices refer\nto occurrence of the switch, such as `-f`, or `--flag`. However, for options the indices\nrefer to the *values* `-o val` would therefore not represent two distinct indices, only the\nindex for `val` would be recorded. This is by design.\n\nBesides the flag/option descrepancy, the primary difference between an argv index and clap\nindex, is that clap continues counting once all arguments have properly seperated, whereas\nan argv index does not.\n\nThe examples should clear this up.\n\n*NOTE:* If an argument is allowed multiple times, this method will only give the *first*\nindex.\n\nThe argv indices are listed in the comments below. See how they correspond to the clap\nindices. Note that if it's not listed in a clap index, this is becuase it's not saved in\nin an `ArgMatches` struct for querying.\n\n```rust\nlet m = App::new(\"myapp\")\n    .arg(Arg::with_name(\"flag\")\n        .short(\"f\"))\n    .arg(Arg::with_name(\"option\")\n        .short(\"o\")\n        .takes_value(true))\n    .get_matches_from(vec![\"myapp\", \"-f\", \"-o\", \"val\"]);\n            // ARGV idices: ^0       ^1    ^2    ^3\n            // clap idices:          ^1          ^3\n\nassert_eq!(m.index_of(\"flag\"), Some(1));\nassert_eq!(m.index_of(\"option\"), Some(3));\n```\n\nNow notice, if we use one of the other styles of options:\n\n```rust\nlet m = App::new(\"myapp\")\n    .arg(Arg::with_name(\"flag\")\n        .short(\"f\"))\n    .arg(Arg::with_name(\"option\")\n        .short(\"o\")\n        .takes_value(true))\n    .get_matches_from(vec![\"myapp\", \"-f\", \"-o=val\"]);\n            // ARGV idices: ^0       ^1    ^2\n            // clap idices:          ^1       ^3\n\nassert_eq!(m.index_of(\"flag\"), Some(1));\nassert_eq!(m.index_of(\"option\"), Some(3));\n```\n\nThings become much more complicated, or clear if we look at a more complex combination of\nflags. Let's also throw in the final option style for good measure.\n\n```rust\nlet m = App::new(\"myapp\")\n    .arg(Arg::with_name(\"flag\")\n        .short(\"f\"))\n    .arg(Arg::with_name(\"flag2\")\n        .short(\"F\"))\n    .arg(Arg::with_name(\"flag3\")\n        .short(\"z\"))\n    .arg(Arg::with_name(\"option\")\n        .short(\"o\")\n        .takes_value(true))\n    .get_matches_from(vec![\"myapp\", \"-fzF\", \"-oval\"]);\n            // ARGV idices: ^0      ^1       ^2\n            // clap idices:         ^1,2,3    ^5\n            //\n            // clap sees the above as 'myapp -f -z -F -o val'\n            //                         ^0    ^1 ^2 ^3 ^4 ^5\nassert_eq!(m.index_of(\"flag\"), Some(1));\nassert_eq!(m.index_of(\"flag2\"), Some(3));\nassert_eq!(m.index_of(\"flag3\"), Some(2));\nassert_eq!(m.index_of(\"option\"), Some(5));\n```\n\nOne final combination of flags/options to see how they combine:\n\n```rust\nlet m = App::new(\"myapp\")\n    .arg(Arg::with_name(\"flag\")\n        .short(\"f\"))\n    .arg(Arg::with_name(\"flag2\")\n        .short(\"F\"))\n    .arg(Arg::with_name(\"flag3\")\n        .short(\"z\"))\n    .arg(Arg::with_name(\"option\")\n        .short(\"o\")\n        .takes_value(true)\n        .multiple(true))\n    .get_matches_from(vec![\"myapp\", \"-fzFoval\"]);\n            // ARGV idices: ^0       ^1\n            // clap idices:          ^1,2,3^5\n            //\n            // clap sees the above as 'myapp -f -z -F -o val'\n            //                         ^0    ^1 ^2 ^3 ^4 ^5\nassert_eq!(m.index_of(\"flag\"), Some(1));\nassert_eq!(m.index_of(\"flag2\"), Some(3));\nassert_eq!(m.index_of(\"flag3\"), Some(2));\nassert_eq!(m.index_of(\"option\"), Some(5));\n```\n\nThe last part to mention is when values are sent in multiple groups with a [delimiter].\n\n```rust\nlet m = App::new(\"myapp\")\n    .arg(Arg::with_name(\"option\")\n        .short(\"o\")\n        .takes_value(true)\n        .multiple(true))\n    .get_matches_from(vec![\"myapp\", \"-o=val1,val2,val3\"]);\n            // ARGV idices: ^0       ^1\n            // clap idices:             ^2   ^3   ^4\n            //\n            // clap sees the above as 'myapp -o val1 val2 val3'\n            //                         ^0    ^1 ^2   ^3   ^4\nassert_eq!(m.index_of(\"option\"), Some(2));\n```","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/f58d05767ec8133c8eb2de117cb642b9ae29ccbc"},{"sha":"21d4828c7605309d01eb3236c556f5647ba00144","author":{"name":"Kevin K","email":"21ce87ad32d444909f317a97166449d6aad0e545@gmail.com"},"message":"chore: increase version","distinct":true,"url":"https://api.github.com/repos/matthiaskrgr/clap-rs/commits/21d4828c7605309d01eb3236c556f5647ba00144"}]}
{"actor":{"display_login":"matthiaskrgr"}}