feat: add -y
flag alias for download command
This commit is contained in:
parent
1d991f7aab
commit
5c84286d9e
2 changed files with 2 additions and 2 deletions
|
@ -69,7 +69,7 @@ cargo download <day>
|
|||
# 🎄 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).
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ fn parse_args() -> Result<Args, pico_args::Error> {
|
|||
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"])?,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue