[feature] Add "--bind" argument to "sonar list"#26
Conversation
Searches the list of display columns for the word "port" and inserts the word "bind" immediately after it. This lets it work nicely when only "--bind" is passed, or when called with "--stats --bind", or even with "--columns port,name --bind"
|
Hi @mct, sonar list -c port,process,pid,type,url,bind
PORT PROCESS PID TYPE URL BIND
1780 proxy (traefik:3.0) 35029 docker http://localhost:1780 0.0.0.0I'm not against making it easier to add columns on top of the default ones, but then i think we should generalize this. If you think it's a very relevant flag to add and will make the tool more useful for you then i'm not against adding it. And thanks a ton for your contribution, much appreciated!! |
|
It's certainly possible without this feature to display the bound IP using Perhaps this could be generalized by having sonar look for an environment variable |
What does this PR do?
Adds
sonar list --bindargument, to easily display the IP address a port is bound to.Searches the list of display columns for the word
portand inserts the wordbindimmediately after it. This lets it work nicely when only--bindis passed, or when called with--stats --bind, or even with--columns port,name --bindRelated issue
None
How was this tested?
Tested on Linux and macOS with:
Checklist