Skip to content

Feature/ignore color option#47

Merged
brona merged 1 commit intobrona:masterfrom
lexhuismans:feature/ignore-color-option
Dec 6, 2023
Merged

Feature/ignore color option#47
brona merged 1 commit intobrona:masterfrom
lexhuismans:feature/ignore-color-option

Conversation

@lexhuismans
Copy link
Contributor

This PR ignores the color option when provided as suggested in Issue #21.

It ignores all the options starting with -c[olor=always|never|auto] or --c[olor=always|never|auto]. Independent on where the option is provided.

Also added orderless option for -4 and -6 and --version for version, but this can be reverted.

Copy link

@ShadowJonathan ShadowJonathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking a look at the flag parsing, it feels a bit finnicky and manual to me, surely we can't use another flag-parsing library for this?

Also; I suggest emitting a warning in stderr instead of stdout regarding the current incompatibility of the color flag with iproute2mac, to make sure people aren't confused when there's no color, and that scripts relying on the stdout of the command dont get the garbage warning also piped to them.

Copy link
Owner

@brona brona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your PR! I added few comments to be resolved.

@lexhuismans lexhuismans requested review from ShadowJonathan and brona and removed request for ShadowJonathan and brona January 23, 2023 21:36
@lexhuismans lexhuismans requested review from ShadowJonathan and brona and removed request for ShadowJonathan and brona February 20, 2023 09:35
@ottnorml
Copy link

@brona any updates on this?

Copy link
Owner

@brona brona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think one last nit (see the comment).

And please could you rebase the PR into a single commit? Otherwise I will squash it. Thanks

@lexhuismans lexhuismans force-pushed the feature/ignore-color-option branch from 7cc487c to 574db79 Compare December 3, 2023 21:15
Copy link
Owner

@brona brona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! and sorry for the delays.

@brona brona merged commit d727a98 into brona:master Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants