summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-07-14 01:04:59 +0200
committerLudovic Courtès <ludo@gnu.org>2022-07-14 01:05:34 +0200
commit5f8adea86cac1e0b126b181a4d3cc67c0503f43b (patch)
tree692d34694cf333ad12686a4051161f4c42b800c0 /doc
parentaf4c103595a725194318f40fc5aba110772ff417 (diff)
doc: Add example of 'bash-extension'.
* doc/guix.texi (Shells Home Services): Add 'bash-extension' example.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index a7ac74b416..8b09bcd4eb 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -39663,6 +39663,23 @@ contents of the extensions will be added to the end of the corresponding
Bash configuration files (@pxref{Bash Startup Files,,, bash, The GNU
Bash Reference Manual}.
+For example, here is how you would define a service that extends the
+Bash service such that @file{~/.bash_profile} defines an additional
+environment variable, @env{PS1}:
+
+@lisp
+(define bash-fancy-prompt-service
+ (simple-service 'bash-fancy-prompt
+ home-bash-service-type
+ (home-bash-extension
+ (environment-variables
+ '(("PS1" . "\\u \\wλ "))))))
+@end lisp
+
+You would then add @code{bash-fancy-prompt-service} to the list in the
+@code{services} field of your @code{home-environment}. The reference of
+@code{home-bash-extension} follows.
+
@deftp {Data Type} home-bash-extension
Available @code{home-bash-extension} fields are: