GNOME Bugzilla – Bug 698070
cli: use 'list' subcommand for listing and 'show' for detailed information
Last modified: 2014-01-06 09:46:34 UTC
I *think* we formerly agreed to use the 'list' command for *listing*, i.e. printing out a list of connections (according to some criteria) and the 'show' command for printing out details about a single connection. In the current 'cli-enhance' branch it looks like we're using 'show' instead of 'list' and the intended 'show' action is not available.
I don't remember talking about this before, but I agree we should do it. I've always found the two different "modes" of list to be weird.
(In reply to comment #0) > I *think* we formerly agreed to use the 'list' command for *listing*, i.e. > printing out a list of connections (according to some criteria) and the 'show' > command for printing out details about a single connection. > > In the current 'cli-enhance' branch it looks like we're using 'show' instead of > 'list' and the intended 'show' action is not available. Yes, we have only 'show' for nmcli device show [<iface>] and nmcli connection show configured [[ id | uuid | path ] <ID>] nmcli connection show active [[ id | uuid | path | apath ] <ID>] because without arguments it shows/lists all connections; with an argument it displays details. I discussed this with dcbw and he said he considered 'show' to be relevant for both cases (at least from the language point of view ;)
(In reply to comment #2) > I discussed this with dcbw and he said he considered 'show' to be relevant for > both cases (at least from the language point of view ;) yes, either of them *could* make sense as "show", it's just weird that we use the same word to to have two different meanings. Also, it's inconsistent between dev and con: nmcli dev - simple list of all devices nmcli dev show - full properties of all devices nmcli dev show IFNAME - full properties of one device nmcli con - simple list of all connections nmcli con show - simple list of all connections (same) nmcli con show ID - syntax error (The last one ties into the fact that it's weird that "nmcli con" has commands for both NMConnections and NMActiveConnections, which I think I'll file another bug about.)
(In reply to comment #3) > (In reply to comment #2) > > I discussed this with dcbw and he said he considered 'show' to be relevant for > > both cases (at least from the language point of view ;) > > yes, either of them *could* make sense as "show", it's just weird that we use > the same word to to have two different meanings. Exactly. I propose to use 'show' for detailed printout of a single item and 'list' for item listings. > Also, it's inconsistent between dev and con: > > nmcli dev - simple list of all devices > nmcli dev show - full properties of all devices nmcli dev / nmcli dev list → simple list of all devices nmcli dev show <item> → detailed information about a connection > nmcli dev show IFNAME - full properties of one device > > nmcli con - simple list of all connections > nmcli con show - simple list of all connections (same) nmcli con / nmcli con list → simple list of all connections nmcli con show <item> → detailed information about a connection > nmcli con show ID - syntax error That's not nice. As for other tools, iproute uses 'show' and doesn't have different output formats (one-line/full). Yum does use different commands, 'list' for listing, 'info' for details (I consider 'show' superior to 'info', though). > (The last one ties into the fact that it's weird that "nmcli con" has commands > for both NMConnections and NMActiveConnections, which I think I'll file another > bug about.) Ah, yes, this should be resolved. Already commented.
NM bugzilla reorganization... sorry for the bug spam.
so... is anything going to change here? If not, we should close this bug now
I think, we are not going to change anything here. Closing.