all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Brice Waegeneire <brice@waegenei.re>
To: 39752@debbugs.gnu.org
Subject: [bug#39752] [PATCH 3/5] doc: Expand the part on special action 'doc'.
Date: Sun, 23 Feb 2020 16:40:06 +0100	[thread overview]
Message-ID: <20200223154008.24888-4-brice@waegenei.re> (raw)
In-Reply-To: <20200223154008.24888-1-brice@waegenei.re>

* doc/shepherd.texi (Jump start): Rewrite paragraph about special action
'doc'.
---
 doc/shepherd.texi | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/doc/shepherd.texi b/doc/shepherd.texi
index 834d47a..fbd1a3f 100644
--- a/doc/shepherd.texi
+++ b/doc/shepherd.texi
@@ -11,6 +11,7 @@
 @copying
 Copyright @copyright{} @value{OLD-YEARS} Wolfgang J@"ahrling@*
 Copyright @copyright{} @value{NEW-YEARS} Ludovic Courtès
+Copyright @copyright{} @value{2020} Brice Waegeneire
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -273,11 +274,6 @@ about the service, like what it provides, what it depends on and with which
 other services it conflicts (because they provide a virtual service that is
 also provided by that particular service).
 
-Another special action is @code{list-actions}, which displays a list
-of the additional actions a service provides; obviously, it can also
-be called when the service is not running.  Services cannot provide
-their own implementation of @code{list-actions}.
-
 A special service is @code{root}, which is used for controlling the
 Shepherd itself.  You can also reference to this service as
 @code{shepherd}.  It implements various actions.  For example, the
@@ -293,6 +289,20 @@ to load arbitrary code into the Shepherd at runtime, like this:
 herd load shepherd ~/additional-services.scm
 @end example
 
+In the same vein the special action @code{doc} describes it service when
+called without an argument or describes a service-specific action when
+called with the action as the additional arguments.  You can even get
+the list of the service-specific actions a service provides when using
+with the additional argument @code{list-actions}.
+@example
+$ herd doc root
+The root service is used to operate on shepherd itself.
+$ herd doc root list-actions
+root (help status halt power-off load eval unload reload daemonize persistency no-persistency cd restart)
+$ herd doc root action power-off
+power-off: Halt the system and turn it off.
+@end example
+
 This is enough now about the @command{herd} and @command{shepherd} programs, we
 will now take a look at how to configure the Shepherd.  In the configuration
 file, we need mainly the definition of services.  We can also do
-- 
2.25.0

  parent reply	other threads:[~2020-02-23 15:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-23  9:18 [bug#39752] [PATCH 0/4 shepherd] Update the doc and an example Brice Waegeneire
2020-02-23  9:20 ` [bug#39752] [PATCH 1/4] doc: Fix typos Brice Waegeneire
2020-02-23  9:20 ` [bug#39752] [PATCH 2/4] service: " Brice Waegeneire
2020-02-23  9:20 ` [bug#39752] [PATCH 3/4] doc: Expand the part on special action 'doc' Brice Waegeneire
2020-02-23 12:49   ` Danny Milosavljevic
2020-02-23 15:43     ` Brice Waegeneire
2020-02-23  9:20 ` [bug#39752] [PATCH 4/4] doc: Fix wolfgangj example Brice Waegeneire
2020-02-23 15:40 ` [bug#39752] [PATCH 0/5 shepherd v2] Update the doc and an example Brice Waegeneire
2020-02-23 15:40   ` [bug#39752] [PATCH 1/5] doc: Fix typos Brice Waegeneire
2020-02-23 15:40   ` [bug#39752] [PATCH 2/5] service: " Brice Waegeneire
2020-02-23 15:40   ` Brice Waegeneire [this message]
2020-02-23 15:40   ` [bug#39752] [PATCH 4/5] doc: Fix wolfgangj example Brice Waegeneire
2020-02-23 15:40   ` [bug#39752] [PATCH 5/5] .dir-locals.el: End sentence with a double space Brice Waegeneire
2020-03-06 13:22   ` bug#39752: [PATCH 0/5 shepherd v2] Update the doc and an example Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200223154008.24888-4-brice@waegenei.re \
    --to=brice@waegenei.re \
    --cc=39752@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.