Lennart Poettering píše v St 08. 08. 2012 v 18:31 +0200: > On Tue, 07.08.12 16:35, Václav Pavlín (vpav...@redhat.com) wrote: > > I am not sure we should include the units from "list-unit-files" in the > output of "list-units", as this would increase the output quite a bit, > and would be hardly helpful in many cases, and slow.
I didn't really meant to include output of one "list-uni*" parameter to another. Those lists does not have much in common and, as You point out, merged output could be slow. > So, dunno, I am not entirely sure how to expose this best. We probably > should get the interface right, and agree how this would be exposed to > the user, before we actually think about implementing it. Neither of the > three options I currently see (extend "systemctl list-units", extend > "systemctl list-unit-files", add a new systemctl verb) are that > pretty in my eyes. I would vote for the "new systemctl verb" option. > If we present the user with a list like this we probably should show a > tree view of some kind since the unit file getty@.service might get > instantiated a couple of times as "getty@tty1.service" and so on, and > hence is in a tree-like relationship. I like the idea of the tree view, but I cannot imagine how it can help to solve autocompletion problem. If I get it right, getty@.service is template file, which cannot be manually instantiated, so it can be omitted from the output (User cannot do anything with it, right?). On the other hand, getty@tty1.service is an instance, which can be stopped, restarted etc., and it will be listed in list-units output (and then in merged output of new systemctl verb as well). > Another option would be to add a notice about "systemctl > list-unit-files" in the footer of "systemctl list-units". That should > already be a big imprvoement, since most people probably interrpet the > current advice of using "--all" like this. It would be helpful, but, again, does not solve the autocompletion problem. > Another option would be to add "systemctl complete" as hidden option for > usage only by bash completion, that does the merging. This makes sense to me. It could be even something like "systemctl list-autocomplete-units". > Yes, storing this in a hashmap does make sense. But really, before we > get hacking we should think about the UI of this. Ok, I will wait for your agreement. Václav _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel