Skip to content

Port before v0.60/virtual_environments - #849

Merged
fdncred merged 5 commits into
nushell:mainfrom
39555:port-before_v0.60/virtual-environments
May 26, 2024
Merged

fdncred merged 5 commits into
nushell:mainfrom
39555:port-before_v0.60/virtual-environments

Conversation

@39555

@39555 39555 commented May 26, 2024

Copy link
Copy Markdown

This PR is part of porting all old scripts #221 and includes the virtual_environments module

5 files changed

  • conda.nu: removed, already in modules/virtual_enviromnents/conda/nu_conda.nu

  • conda_deactivate.nu: also removed, has already been merged with nu_conda.nu

  • README.nu: removed, similar info in modules/virtual_enviromnents/README.md

  • venv.nu: ported to modules/virtual_enviromnents/venv/venv.nu

  • venv_deactivate.nu: ported to modules/virtual_enviromnents/venv/venv_deactivate.nu

Igor added 4 commits May 26, 2024 14:11
to `modules/virtual_enviromnemts/venv.nu` `venv_deactivate.nu`
- The `conda.nu` script has already been ported to `modules/virtual_environments/conda/*`
- remove README.md because the information is already in `modules/virtual_environments/README.md`
- copy the already ported activation script from `conda.nu`
- add `load-env` and `def --env`
- remove duplication for PATH/Path because nu now supports case insensitive access
- remove $nu.path use $env.PATH
- remove PATH serialization to string/from string
- use a record instead of a table for `load-env`
@fdncred

fdncred commented May 26, 2024

Copy link
Copy Markdown
Contributor

if scripts are in the modules folders, they need to have exports, otherwise they need to be in the scripts folder.

make similar to `conda.nu`
- add `export` keyword
@39555

39555 commented May 26, 2024

Copy link
Copy Markdown
Author

Now venv.nu is similar to conda.nu

  • function def venv -> export def --env activate
  • the plain file venv_deactivate.nu ->export def --env deactivate in venv.nu

@fdncred
fdncred merged commit 840d723 into nushell:main May 26, 2024
@fdncred

fdncred commented May 26, 2024

Copy link
Copy Markdown
Contributor

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants