summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-10-01 17:18:43 +0200
committerLudovic Courtès <ludo@gnu.org>2021-10-25 19:02:23 +0200
commit746584e0ca200e7bf51b139ceb36c19ea81d6ef1 (patch)
treefab400deeddcff3cf47305d88fe20df32a8bcac1 /doc
parent80edb7df6586464aa40e84e103f0045452de95db (diff)
downloadguix-746584e0ca200e7bf51b139ceb36c19ea81d6ef1.tar.gz
shell: By default load the local 'manifest.scm' or 'guix.scm' file.
* guix/scripts/shell.scm (parse-args): Add call to 'auto-detect-manifest'.
(authorized-directory-file, authorized-shell-directory?)
(find-file-in-parent-directories, auto-detect-manifest): New procedures.
* tests/guix-shell.sh: Add test.
* doc/guix.texi (Invoking guix shell): Document it.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index f5bfb59229..5809bbacd4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5621,6 +5621,20 @@ before @command{guix shell} was invoked.  The next garbage collection
 (@pxref{Invoking guix gc}) may clean up packages that were installed in
 the environment and that are no longer used outside of it.
 
+As an added convenience, when running from a directory that contains a
+@file{manifest.scm} or a @file{guix.scm} file (in this order), possibly
+in a parent directory, @command{guix shell} automatically loads the
+file---provided the directory is listed in
+@file{~/.config/guix/shell-authorized-directories}, and only for
+interactive use:
+
+@example
+guix shell
+@end example
+
+This provides an easy way to define, share, and enter development
+environments.
+
 By default, the shell session or command runs in an @emph{augmented}
 environment, where the new packages are added to search path environment
 variables such as @code{PATH}.  You can, instead, choose to create an