You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(nl): allow repeated flags to match GNU nl behavior (fixes#9132)
- Add .args_override_self(true) to Command builder to enable 'last wins' behavior
- Add .action(ArgAction::Append) to all 10 value-accepting arguments:
- BODY_NUMBERING (-b), HEADER_NUMBERING (-h), FOOTER_NUMBERING (-f)
- NUMBER_FORMAT (-n), NUMBER_SEPARATOR (-s), NUMBER_WIDTH (-w)
- LINE_INCREMENT (-i), JOIN_BLANK_LINES (-l), STARTING_LINE_NUMBER (-v)
- SECTION_DELIMITER (-d)
- Update helper.rs to use get_last() helper function to retrieve the last value
from repeated arguments using get_many() and next_back()
- Add 10 regression tests to verify repeated flags are accepted and use last value
This matches GNU nl behavior where repeated flags are accepted and the last
occurrence's value is used, instead of rejecting with an error.
0 commit comments