aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-10-09 12:11:24 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-10-09 12:17:01 -0400
commit1de2fe95e017c42aacbaa34f5dab8d48249cc064 (patch)
tree12ee4d22703352afcf478f581b4b2cfafc8a8b6e /doc
parentbbd00d2012833c6419a62f6490cbef3e896b1e11 (diff)
downloadguix-1de2fe95e017c42aacbaa34f5dab8d48249cc064.tar
guix-1de2fe95e017c42aacbaa34f5dab8d48249cc064.tar.gz
scripts: environment: Use system* instead of system.
This allows for direct program invokation without needing a shell to act as a command interpreter. * guix/scripts/environment.scm (%default-shell): New variable. (show-help): Adjust description. Remove '--exec' reference. (%default-options): Use '%default-shell'. (%options): Adjust '--exec' to run command via the default shell. (parse-args): New procedure. (guix-environment): Use 'parse-args'. Use 'system*' instead of 'system'. * tests/guix-environment.sh: Add test for '--' command invokation. * doc/guix.texi ("Invoking guix environment"): Use new syntax. Remove '--exec' documentation.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi16
1 files changed, 6 insertions, 10 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 6da7281566..39b76c7bf6 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4538,11 +4538,12 @@ and Emacs are available:
guix environment guile emacs
@end example
-Sometimes an interactive shell session is not desired. The
-@code{--exec} option can be used to specify the command to run instead.
+Sometimes an interactive shell session is not desired. An arbitrary
+command may be invoked by placing the @code{--} token to separate the
+command from the rest of the arguments:
@example
-guix environment guile --exec=make
+guix environment guile -- make -j4
@end example
In other situations, it is more convenient to specify the list of
@@ -4551,7 +4552,7 @@ runs @command{python} from an environment containing Python@tie{}2.7 and
NumPy:
@example
-guix environment --ad-hoc python2-numpy python-2.7 -E python
+guix environment --ad-hoc python2-numpy python-2.7 -- python
@end example
The available options are summarized below.
@@ -4582,11 +4583,6 @@ As an example, @var{file} might contain a definition like this
@verbatiminclude environment-gdb.scm
@end example
-
-@item --exec=@var{command}
-@item -E @var{command}
-Execute @var{command} in the new environment.
-
@item --ad-hoc
Include all specified packages in the resulting environment, as if an
@i{ad hoc} package were defined with them as inputs. This option is
@@ -4596,7 +4592,7 @@ package expression to contain the desired inputs.
For instance, the command:
@example
-guix environment --ad-hoc guile guile-sdl -E guile
+guix environment --ad-hoc guile guile-sdl -- guile
@end example
runs @command{guile} in an environment where Guile and Guile-SDL are