-
Notifications
You must be signed in to change notification settings - Fork 77
Implement -br flag for brief interface output. #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update, I will hopefully get to merge it later this week. I left couple last nits.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
|
|
||
| ## Changelog | ||
| <details open> | ||
| <summary><b>HEAD</b></summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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.