[systemd-devel] [PATCH] systemctl: Implement "info" and "doc" commands, similar to "man"

Gergely Nagy algernon at balabit.hu
Thu May 31 04:47:32 PDT 2012


Lennart Poettering <lennart at poettering.net> writes:

> On Thu, 31.05.12 13:22, Gergely Nagy (algernon at balabit.hu) wrote:
>
>> > On Thu, 31.05.12 12:56, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:
>> >> On 05/31/2012 12:40 PM, Lennart Poettering wrote:
>> >> > I'd be open to rename "systemctl man" to "systemctl doc" too, if people
>> >> > want this, if we make it cover both man and info. Not sure I like "doc"
>> >> > too much though. Maybe we can find another name? Suggestions? The reason
>> >> > I picked "man" in the first place is that it is kinda an obvious choice
>> >> > and man is much more ubiquititous than info.
>> >> 'help' seems to be used -- e.g. 'git help rebase'.
>> >
>> > We already have "systemctl help", which is equivalent to "systemctl
>> > --help".
>> >
>> > I wonder though whether it would make sense to make "systemctl help"
>> > with params work as before but with params take over the role of
>> > "systemctl man"? Would that be confusing?
>> 
>> I don't think it would be. It would actually match my expectations
>> (spoiled by git, I am).
>
> OK, let's do it like this: let's rename "systemctl man" to "systemctl
> help", and when somebody calls that without any arguments we show one
> line that reads something like this: "This command expects one or more
> unit names. Or did you mean systemctl --help?"
>
> That way we are still helpful to users but kinda avoid the problem of
> overloading one command with different meanings.
>
> "systemctl help" would invoke "man" and "info" as necessary, but for
> http/https it would just output some informational message including the
> URL but not invoke xdg-open (for the reasons mentioned earlier). I think
> this would be a really nice solution that should make most people happy,
> feel natural, and have very few unpleasant surprises.

Sounds good. If I have some more time today, I'll prepare a patch that
does the above (and supports all the info URIs mentioned elsewhere).

-- 
|8]



More information about the systemd-devel mailing list