Skip to content

Moves additional env vars out of default_env and updates some transient prompt vars#14579

Merged
fdncred merged 2 commits intonushell:mainfrom
NotTheDr01ds:move-prompt-to-main
Dec 16, 2024
Merged

Moves additional env vars out of default_env and updates some transient prompt vars#14579
fdncred merged 2 commits intonushell:mainfrom
NotTheDr01ds:move-prompt-to-main

Conversation

@NotTheDr01ds
Copy link
Copy Markdown
Contributor

@NotTheDr01ds NotTheDr01ds commented Dec 13, 2024

Description

With NU_LIB_DIRS, NU_PLUGIN_DIRS, and ENV_CONVERSIONS now moved out of default_env.nu, we're down to just a few left. This moves all non-closure PROMPT variables out as well (and into Rust main(). It also:

User-Facing Changes

Transient prompt will now remove the right-prompt and multiline-indicator once a commandline has been entered.

Tests + Formatting

  • 🟢 toolkit fmt
  • 🟢 toolkit clippy
  • 🟢 toolkit test
  • 🟢 toolkit test stdlib

After Submitting

Release notes addition

@NotTheDr01ds NotTheDr01ds added notes:breaking-changes This PR implies a change affecting users and has to be noted in the release notes notes:fixes Include the release notes summary in the "Bug fixes" section A:environment Related to the management of environment variables/process state and removed notes:fixes Include the release notes summary in the "Bug fixes" section notes:breaking-changes This PR implies a change affecting users and has to be noted in the release notes labels Dec 13, 2024
@IanManske
Copy link
Copy Markdown
Member

Should these environment variables only be added in interactive mode? I think for scripts these should not be added to avoid polluting the environment.

@NotTheDr01ds
Copy link
Copy Markdown
Contributor Author

@IanManske Good point - I've moved them inside the interactive-check that SHLVL is in. Thanks!

@fdncred fdncred merged commit 39770d4 into nushell:main Dec 16, 2024
@github-actions github-actions bot added this to the v0.101.0 milestone Dec 16, 2024
@fdncred
Copy link
Copy Markdown
Contributor

fdncred commented Dec 16, 2024

Thanks. I'm a little nervous about the TRANSIENT prompt changes but let's see how it goes.

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

Labels

A:environment Related to the management of environment variables/process state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistency in how/when $env.config and other variables are populated No prompt-indicator when starting with no config (nu -n) after using Starship

3 participants