Skip to content

Commit 5c84286

Browse files
committed
feat: add -yflag alias for download command
1 parent 1d991f7 commit 5c84286

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ cargo download <day>
6969
# 🎄 Successfully wrote input to "src/inputs/01.txt"!
7070
```
7171

72-
To download inputs for previous years, append the `--year` flag. _(example: `cargo download 1 --year 2020`)_
72+
To download inputs for previous years, append the `--year/-y` flag. _(example: `cargo download 1 --year 2020`)_
7373

7474
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).
7575

src/bin/download.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn parse_args() -> Result<Args, pico_args::Error> {
1212
let mut args = pico_args::Arguments::from_env();
1313
Ok(Args {
1414
day: args.free_from_str()?,
15-
year: args.opt_value_from_str("--year")?,
15+
year: args.opt_value_from_str(["-y", "--year"])?,
1616
})
1717
}
1818

0 commit comments

Comments
 (0)