Function reups_lib::env_command

source ·
pub fn env_command(sub_args: &ArgMatches<'_>, _main_args: &ArgMatches<'_>)
Expand description

This is the main entry point for the env sub command. This command is used to save and restore the (r)eups managed environment that is setup in the current shell. This function has different effects based on the sub command argument supplied. The save argument will write out the current environment either named default, or with the optinally supplied name. A convienence shell function called rsave is supplied by reups prep to do the same task with less typing. The list subcommand will list all the environments previously saved. If the delete argument is supplied, the given named environment will be discarded, note the default environment cannot be deleted. The restore argument is used by this program to reconstruct the chosen environment. Because of the limitations of working with shells, the user should interact with this though the shell function rrestore that is supplied with the reups prep command.

  • sub_args - Arguments matched from the command line to the given sub command
  • _main_args - Arguments matched from the command line to the main reups executable, global arguments