feat: Implement color output
Thank you for the PR, I will review it next week.
Any news about implementing/merging this feature? As of 1.5.4 it is not implemented.
Unfortunately, I didn't get back to this. As this is adding considerable amount of code and a class...
Anyway two things that are possibly missing here:
- Similar support for the bridge command which is in separate file
- Perhaps a bit of comparison between the implementation / what is in the linux version, to make sure it is identical, as I don't see that in the tests or elsewhere - probably should be discussed at least here.
Regarding the class added to iproute2mac.py file, I wonder if you could turn that into functions / or refactor that out into a separate file.
I have updated the new color class implementation in a separate file and completed the bridge color output. It works on my machine, so it should work for you as well.
Any news about implementing/merging this feature? As of 1.5.4 it is not implemented.
I have a new fork for that, with ss command support.
https://github.com/luoling8192/iproute2mac-color
Hey @brona Could you please complete your review and merge this? It has been open since last year, mate, come on!
Thanks for the interest @alifiroozi80.
I finally got some time to look into this one more closely. However the author took some liberties with the implementation which I don't necessarily agree with.
Specifically:
- The applied coloring didn't highlight the same elements as the Linux version (e.g. word
inetinstead of the address itself, etc.) - The
automode was enabled by default, while in the libraryneveris the default option - The coloring was not implemented across the other
showcommands for other modules.
That being said, big thanks @luoling8192 for starting this one! I took your ideas, merged them with mine and implemented that in 0b4bf6b, currently in HEAD, to recognize your contributions I added you to the AUTHORs file.
Any chance someone could test the version from HEAD to see if there are any issues to be addressed before release? Closing this PR as we can follow up on the linked issues.