guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#51543] [PATCH 2/2] doc: Document ‘home-bash-extension’ configuratio


From: Xinglu Chen
Subject: [bug#51543] [PATCH 2/2] doc: Document ‘home-bash-extension’ configuration record.
Date: Mon, 01 Nov 2021 10:45:53 +0100

* doc/guix.texi (Shells Home Services): Document ‘home-bash-extension’
  configuration record.
* gnu/home/services/shells.scm (generate-home-bash-documentation): Extract
  docstrings from ‘home-bash-extension’.

Fixes: <https://issues.guix.gnu.org/50991>
---
 doc/guix.texi                | 24 ++++++++++++++++++++++++
 gnu/home/services/shells.scm | 14 ++++++++++----
 2 files changed, 34 insertions(+), 4 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index f7312a5b30..a3b440f5c9 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -36206,7 +36206,31 @@
 process for example).
 
 @end table
+@end deftp
+
+To extend the Bash service, one has to use a @code{home-bash-extension},
+which contains mostly the same fields as @code{home-bash-configuration}.
+
+@deftp {Data Type} home-bash-extension
+Available @code{home-bash-extension} fields are:
+
+@table @asis
+@item @code{environment-variables} (default: @code{()}) (type: alist)
+Association list of environment variables to set.
+
+@item @code{aliases} (default: @code{()}) (type: alist)
+Association list of aliases to set.
 
+@item @code{bash-profile} (default: @code{()}) (type: text-config)
+List of file-like objects.
+
+@item @code{bashrc} (default: @code{()}) (type: text-config)
+List of file-like objects.
+
+@item @code{bash-logout} (default: @code{()}) (type: text-config)
+List of file-like objects.
+
+@end table
 @end deftp
 
 @subsubheading Zsh Home Service
diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm
index bd1595a041..9eeb7153e3 100644
--- a/gnu/home/services/shells.scm
+++ b/gnu/home/services/shells.scm
@@ -648,10 +648,16 @@ (define (generate-home-shell-profile-documentation)
    'home-shell-profile-configuration))
 
 (define (generate-home-bash-documentation)
-  (generate-documentation
-   `((home-bash-configuration
-      ,home-bash-configuration-fields))
-   'home-bash-configuration))
+  (string-append
+   (generate-documentation
+    `((home-bash-configuration
+       ,home-bash-configuration-fields))
+    'home-bash-configuration)
+   "\n\n"
+   (generate-documentation
+    `((home-bash-extension
+       ,home-bash-extension-fields))
+    'home-bash-extension)))
 
 (define (generate-home-zsh-documentation)
   (generate-documentation
-- 
2.33.0








reply via email to

[Prev in Thread] Current Thread [Next in Thread]