diff --git a/README.md b/README.md index 573fdbe..ab81c02 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ cargo download # 🎄 Successfully wrote input to "src/inputs/01.txt"! ``` -To download inputs for previous years, append the `--year` flag. _(example: `cargo download 1 --year 2020`)_ +To download inputs for previous years, append the `--year/-y` flag. _(example: `cargo download 1 --year 2020`)_ Puzzle inputs are not checked into git. [Reasoning](https://old.reddit.com/r/adventofcode/comments/k99rod/sharing_input_data_were_we_requested_not_to/gf2ukkf/?context=3). diff --git a/src/bin/download.rs b/src/bin/download.rs index 8c09679..f10aab3 100644 --- a/src/bin/download.rs +++ b/src/bin/download.rs @@ -12,7 +12,7 @@ fn parse_args() -> Result { let mut args = pico_args::Arguments::from_env(); Ok(Args { day: args.free_from_str()?, - year: args.opt_value_from_str("--year")?, + year: args.opt_value_from_str(["-y", "--year"])?, }) }