Implement -br flag for brief interface output.#69
Conversation
|
Hey @brona , any chance of a merge? |
|
Hi, hopefully I will get to this by end of July, I have some time off planned so I will go through the PRs here and merge them & release. |
|
Any chance you could sync the PR to current master and resolve conflicts? Thanks |
1 similar comment
|
Any chance you could sync the PR to current master and resolve conflicts? Thanks |
|
@brona I think I've pulled in your latest and fixed the conflicts while preserving all the functionality. Seems like it all works as expected. |
brona
left a comment
There was a problem hiding this comment.
Thanks for updating the PR, I added few more comments. Happy to merge afterwards.
Thanks for the contribution.
|
Looks like everything's fixed, let me know if there's any other changes you need. |
|
@brona Is this good, or do you need any more updates? |
brona
left a comment
There was a problem hiding this comment.
Thanks for the update, I will hopefully get to merge it later this week. I left couple last nits.
src/ip.py
Outdated
| for a in l.get("addr_info", []): | ||
| if brief: | ||
| # Brief format: interface_name STATUS ip_addresses... | ||
| # Interface name (left-padded to align) |
There was a problem hiding this comment.
Let's use rjust or ljust ?
https://docs.python.org/3/library/stdtypes.html#str.rjust
https://docs.python.org/3/library/stdtypes.html#str.ljust
Btw isn't this actually right padded?
README.md
Outdated
|
|
||
| ## Changelog | ||
| <details open> | ||
| <summary><b>HEAD</b></summary> |
There was a problem hiding this comment.
Please merge it with the HEAD section below.
|
@xraystyle any chance you could take a look at the above comment? I really appreciate you implementing this, I've been missing this feature for a long time |
I'll see if I can take a look in the next few days. I should have some free time this weekend. |
|
guys, if it works, lets merge as it is , and fix bugs later? PS: i keep adding "-br" flag under macos, always gives me an error... |
|
Just pushed an update, sorry I completely forgot about this. Good to go now @brona? |
|
I will merge and fix the remaining issues... |
This pull request implements the
-brflag for brief output as it would work on iproute2 on Linux.Example:
Additional tests have been added to check the flag is parsed correctly and working.