From c5984c767b88899a9c97e1dea72829c0635e3e8c Mon Sep 17 00:00:00 2001
From: obarun <eric@obarun.org>
Date: Sat, 2 Dec 2023 23:06:19 +1100
Subject: [PATCH] add init tree subcommand documentation

---
 doc/tree.md                  | 24 ++++++++++++++++++++++++
 src/lib66/exec/ssexec_help.c |  2 +-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/doc/tree.md b/doc/tree.md
index 4f68f8a8..36fde69b 100644
--- a/doc/tree.md
+++ b/doc/tree.md
@@ -407,6 +407,30 @@ Displays contents of the `treefoo` resolve file.
 ```
 66 tree resolve treefoo
 ```
+### Init
+
+#### Interface
+
+This command initiate services of a tree to a scandir directory
+
+```
+66 tree init [ -h ] tree
+```
+
+The behavior of this subcommand will depends of the state of the [scandir](scandir.html). If the scandir is not running, this command will initiate earlier services of *tree*, in other case its initiate all *enabled* services within *tree*.
+
+This subcommand is primarily used internally by `66 boot` command to initiate earlier services of *tree*. Initiation of services is made automatically at each invocation of `66 start` or `66 tree start` command is services was not initiate previously.
+
+#### Options
+
+- **-h**: prints this help.
+
+#### Usage examples
+
+Initiates all *enabled* services of `treefoo` to a running scandir
+```
+66 tree init treefoo
+```
 
 ### Start
 
diff --git a/src/lib66/exec/ssexec_help.c b/src/lib66/exec/ssexec_help.c
index bc816ec3..09902c65 100644
--- a/src/lib66/exec/ssexec_help.c
+++ b/src/lib66/exec/ssexec_help.c
@@ -422,7 +422,7 @@ char const *help_tree_status =
 char const *usage_tree_init = "66 tree init [ -h ] tree" ;
 
 char const *help_tree_init =
-"\ninitiate all services present in tree to a scandir already running\n"
+"\ninitiate all enabled services associated to a tree to a scandir directory\n"
 "\n"
 "options:\n"
 "   -h: print this help\n"
-- 
GitLab