`for arg in "$@"; do shift` doesn't update the iteration variable, so
`DAYS="${1:-30}"` after `shift` was reading the next $1 from the still-
populated argv at that point — which happened to be the literal string
"--days" rather than the intended numeric value.
Result: section labels printed "(--days days)" instead of "(N days)".
Refactored to a `while [[ $# -gt 0 ]]` loop that correctly handles the
two-token `--days N` form. Stash + restore via `SAVED_ARGS` keeps
downstream parse_common_flags / maybe_filter_self working unchanged.
Caught by dogfooding quickrun.sh end-to-end.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||