From 746584e0ca200e7bf51b139ceb36c19ea81d6ef1 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 1 Oct 2021 17:18:43 +0200 Subject: 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. --- doc/guix.texi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') 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 -- cgit v1.2.3