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

Make if blocks work like a def-env #4656

Merged
merged 5 commits into from
Mar 8, 2022
Merged

Conversation

sophiajt
Copy link
Contributor

Description

This turns if's way of handling its then/else to work like def-env. These blocks will be able to participate in the owning environment but will still have their own unique scope for other values.

Tests

Make sure you've run and fixed any issues with these commands:

  • cargo fmt --all -- --check to check standard code formatting (cargo fmt --all applies these changes)
  • cargo clippy --all --all-features -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect to check that you're using the standard code style
  • cargo build; cargo test --all --all-features to check that all the tests pass

@sophiajt sophiajt closed this Feb 26, 2022
@sophiajt sophiajt deleted the if_def_env branch February 26, 2022 18:40
@sophiajt sophiajt restored the if_def_env branch February 27, 2022 01:30
@sophiajt
Copy link
Contributor Author

Going to re-open so we can figure out why this broke. I think this is still a worthwhile experiment to try

@sophiajt sophiajt changed the title Make if work like a def-env Make if blocks work like a def-env Mar 8, 2022
@sophiajt sophiajt merged commit 477f3be into nushell:main Mar 8, 2022
@sophiajt sophiajt deleted the if_def_env branch March 8, 2022 12:45
@sophiajt sophiajt restored the if_def_env branch March 8, 2022 12:56
sophiajt added a commit that referenced this pull request Mar 8, 2022
sophiajt added a commit that referenced this pull request Mar 8, 2022
@sophiajt sophiajt deleted the if_def_env branch September 2, 2023 16:11
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.

None yet

1 participant