Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port before v0.60/virtual_environments #849

Merged
merged 5 commits into from
May 26, 2024

Conversation

39555
Copy link
Contributor

@39555 39555 commented May 26, 2024

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

39555 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
Copy link
Collaborator

fdncred commented May 26, 2024

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
Copy link
Contributor Author

39555 commented May 26, 2024

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
1 check passed
@fdncred
Copy link
Collaborator

fdncred commented May 26, 2024

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