NAME

bundle - load specific environment in current shell


SYNOPSIS

 bundle avail
 bundle show bundle-file
 bundle load bundle-file
 bundle unload
 bundle list
 bundle source bundle-file
 bundle status
 bundle help


DESCRIPTION

bundle can load a new environment in current shell (source) or load it in a sub-shell. In this second case, environment could be unload!

This shell function looks furiously at the command module. It's wanted but is much simpler (no tcl...). The arguments are quite the same. There is no magic done on the current environment variables (remember, bundle just source shell file).

bundle launch a new shell (sub-shell) at load and exit it at unload. It's all!

No... In interactive mode, it's save the current history so this one can be use in the sub-shell. The same thing is done at the end of the sub-shell, history is then reload in the master shell. For the user point of vu, it's like there is only one shell!

But be carrefull with variable, only export variable could be use in sub-shell.


COMMAND

avail

List all available bundle. Bundle are search in two specific path: ${HOME}/.config/bundle/source.d and /etc/bundle/source.d

Bundle are just shell script with the shell name as extension (.bash for bash script). Bundle are first search in user folder. This allows the user to overloaded a system bundle.

show bundle-file

Show a small description of the bundle file if available... Format is done width the command pod2text. Documentation can be written at the end of the script after a last command return for bash.

load bundle-file

Start a new shell and source bundle file inside.

unload

End of bundle specific shell.

list

List loaded bundle.

source bundle-file

Source bundle in current shell. Environment could not be unload...

status

Indicates whether we are in a bundle or not.

help

Usage line.


EXAMPLE

Which is better : load or source ?

Sub-Shell

Load and Unload command must be enclose. In an interactive shell, it's very important to unload every bundle loaded!

 bundle load intel/2011.7
   ifort -v
 bundle unload

Load command in better in interactive shell.

If use in a script file, you just have to remenber that load start a new shell, and unload just exit it (but not work in script file)

 bundle load intel/2011.7 <<'END_BUNDLE'
   ifort -v
 END_BUNDLE

It's better to use quote around END_BUNDLE, current shell will not evaluate next command before passing them to sub-shell !

Maybe it's then simpler to use source command and integrated sub-shell

 ( bundle source intel/2011.7
   ifort -v
 )

Source

Source command just source shell script in current environment. No unload is possible.

 bundle source intel/2011.7

Source command is better in batch script because you have don't have to unload in current case.


SEE ALSO

sysprofile, module


AUTHORS

Written by Gabriel Moreau, Grenoble - France


LICENSE AND COPYRIGHT

GPL version 2 or later

Copyright (C) 2011-2012 Gabriel Moreau / LEGI - CNRS UMR 5519 - France