1
Fork 0
mirror of https://github.com/RGBCube/AdventOfCode synced 2025-07-25 19:17:44 +00:00

Add completer

This commit is contained in:
RGBCube 2023-12-03 12:18:00 +03:00
parent 2936b42463
commit cd99337b26
No known key found for this signature in database

6
run.nu
View file

@ -1,8 +1,12 @@
#!/usr/bin/env nu
def complete [] {
ls 2023 | get names | filter { not ($in str-endswith ".in") }
}
# Run a specified AoC solution.
def main [
year_day_part_ext: string # The file to run. For example `2023/1-2.py` or `2023/1-2.nix`.
year_day_part_ext: string@complete # The file to run. For example `2023/1-2.py` or `2023/1-2.nix`.
] {
match ($year_day_part_ext | path parse | get extension) {
"nix" => {