## Description
Three independent changes make the REPL ready to type into sooner. With
the default config, launching `nu` until the first prompt is drawn drops
from 15.7 ms to 13.1 ms (−17%). `$nu.startup-time` is measured the same
way as before.
Measurements:
| default config, from `~` | main | this PR |
| --- | --- | --- |
| launch to first prompt | 15.70 ms | 13.10 ms |
| `$nu.startup-time` | 8.03 ms | 7.36 ms |
| instructions retired by the first prompt | 149.3M | 119.8M |
1. Change the linker on Apple silicon to
`"cargo:rustc-link-arg-bins=-Wl,-fixup_chains"`
2. Make `banner` cheaper (all architectures)
3. Keep prompt pushes that land before the prompt is rebuilt (all
architectures)
## User-facing changes (Release notes)
- Improved startup time. On Apple silicon Macs, `nu` is now linked with
chained fixups, so less work happens before Nushell's own code starts
and each `nu` process uses about 3 MiB less memory. The startup banner
no longer computes the welcome message when it only prints the startup
time.
- `date to-timezone` (all architectures) now accepts IANA time zone
names in any letter case, for example `date now | date to-timezone
america/new_york`. Before, some lowercase names were rejected as
invalid.
- Background jobs that update the prompt with `commandline set-prompt`
(all architectures), started from a `pre_prompt` or `env_change` hook or
from a prompt closure such as `$env.PROMPT_COMMAND`, no longer lose that
update when they finish before the prompt is drawn. A `commandline
set-prompt` called directly inside one of those hooks or prompt closures
now also shows on that prompt, in place of the value the prompt
variables give that segment. Before, the prompt evaluation that follows
the hooks always replaced it.
## Additional notes
<!--
Optional.
Examples:
- fixes#123
- closes#456
- related #789
Anything else reviewers should know.
Remove this section if not needed.
-->
## Description
nixpkgs turned the `xorg` set into a warning alias, thus
`scripts/nix/default.nix` printed `'xorg.libX11' has been renamed to
'libx11'` on every evaluation.
This takes the top-level `libx11` instead.
`libX11` exists at the top level too, but only as an alias, so `libx11`
is the name that stays.
## User-facing changes (Release notes)
n/a
## Additional notes
Checked against current nixos-unstable, evaluates without the warning.
## Description
Remove `x86_64-darwin` (Intel Mac) from the Nix flake's supported
systems because nixos-unstable after 26.05 has dropped support for this
platform, causing evaluation to fail.
This removes Intel Mac outputs from `packages`, `legacyPackages`, and
`devShells`. Apple Silicon Mac support remains available through
`aarch64-darwin`.
Also update `flake.lock` to refresh the `nixpkgs` and `rust-overlay`
inputs.
## User-facing changes (Release notes)
Removed Intel Mac (`x86_64-darwin`) support from the Nushell Nix flake
following its removal from upstream Nixpkgs. Apple Silicon Macs remain
supported.
## Description
#18968 bumped `rust-toolchain.toml` to 1.96.1,
but the `rust-overlay` rev locked in `scripts/nix/flake.lock` predates that release,
so `fromRustupToolchainFile` fails with `error: Stable 1.96.1 is not available` and the flake will not evaluate.
Bumps `rust-overlay` `4a408e1` -> `6ae57a7`, lock file only.
`nixpkgs` left alone, since nothing forces it.
Checked on `x86_64-linux`: the toolchain resolves to `rust-default-1.96.1` and the default package evaluates again.
## User-facing changes (Release notes)
n/a, only affects building from the flake in `scripts/nix`.
## Additional notes
Follow-up to #18968.
<!--
Thanks for contributing to Nushell!
Before submitting, please read the contributing guide:
https://github.com/nushell/nushell/blob/main/CONTRIBUTING.md
This template helps reviewers understand your changes and allows us to
generate high-quality release notes.
-->
## Description
This PR adds some parser benchmarks. See how to run them below. You
should get an output similar this below. Hopefully my math is right.
```nushell
Throughput summary (derived from benchmark timing, unit: micro):
╭────┬─────────────────────────────────────────┬───────┬───────┬─────────┬───────────┬────────────────┬────────────────╮
│ # │ benchmark │ chars │ bytes │ seconds │ time_unit │ chars_per_unit │ bytes_per_unit │
├────┼─────────────────────────────────────────┼───────┼───────┼─────────┼───────────┼────────────────┼────────────────┤
│ 0 │ parser_lex_large_97332b_97098c │ 97098 │ 97332 │ 0.00 │ micro │ 246.38 │ 246.97 │
│ 1 │ parser_lex_medium_4315b_4315c │ 4315 │ 4315 │ 0.00 │ micro │ 169.22 │ 169.22 │
│ 2 │ parser_lex_small_82b_82c │ 82 │ 82 │ 0.00 │ micro │ 106.11 │ 106.11 │
│ 3 │ parser_lite_medium_4315b_4315c │ 4315 │ 4315 │ 0.00 │ micro │ 95.46 │ 95.46 │
│ 4 │ parser_lite_real_world_620b_620c │ 620 │ 620 │ 0.00 │ micro │ 38.51 │ 38.51 │
│ 5 │ parser_lite_small_82b_82c │ 82 │ 82 │ 0.00 │ micro │ 5.99 │ 5.99 │
│ 6 │ parser_parse_block_medium_4315b_4315c │ 4315 │ 4315 │ 0.00 │ micro │ 37.52 │ 37.52 │
│ 7 │ parser_parse_block_real_world_620b_620c │ 620 │ 620 │ 0.00 │ micro │ 24.31 │ 24.31 │
│ 8 │ parser_parse_block_small_82b_82c │ 82 │ 82 │ 0.00 │ micro │ 4.77 │ 4.77 │
│ 9 │ parser_parse_large_97332b_97098c │ 97098 │ 97332 │ 0.00 │ micro │ 97.10 │ 97.33 │
│ 10 │ parser_parse_medium_4315b_4315c │ 4315 │ 4315 │ 0.00 │ micro │ 44.62 │ 44.62 │
│ 11 │ parser_parse_small_82b_82c │ 82 │ 82 │ 0.00 │ micro │ 4.27 │ 4.27 │
╰────┴─────────────────────────────────────────┴───────┴───────┴─────────┴───────────┴────────────────┴────────────────╯
Headline metric candidates (chars/micro):
╭───┬──────────────────────────────────┬────────────────╮
│ # │ benchmark │ chars_per_unit │
├───┼──────────────────────────────────┼────────────────┤
│ 0 │ parser_lex_large_97332b_97098c │ 246.38 │
│ 1 │ parser_lex_medium_4315b_4315c │ 169.22 │
│ 2 │ parser_lex_small_82b_82c │ 106.11 │
│ 3 │ parser_parse_large_97332b_97098c │ 97.10 │
│ 4 │ parser_lite_medium_4315b_4315c │ 95.46 │
╰───┴──────────────────────────────────┴────────────────╯
Benchmark logfile: target/parser-bench/benchmarks-parser__-20260519-125213.log
parser_lex_small_82b_82c [ 758.0 ns ... 772.8 ns ... 829.7 ns ] stddev: 14.8 ns
parser_lex_medium_4315b_4315c [ 25.2 us ... 25.5 us ... 26.1 us ] stddev: 248.3 ns
parser_lex_large_97332b_97098c [ 389.0 us ... 394.1 us ... 410.0 us ] stddev: 4.7 us
parser_lite_small_82b_82c [ 13.2 us ... 13.7 us ... 17.7 us ] stddev: 670.6 ns
parser_lite_medium_4315b_4315c [ 45.0 us ... 45.2 us ... 46.0 us ] stddev: 183.7 ns
parser_lite_real_world_620b_620c [ 15.9 us ... 16.1 us ... 18.1 us ] stddev: 374.2 ns
parser_parse_block_small_82b_82c [ 16.7 us ... 17.2 us ... 19.0 us ] stddev: 402.0 ns
parser_parse_block_medium_4315b_4315c [ 111.0 us ... 115.0 us ... 124.3 us ] stddev: 3.1 us
parser_parse_block_real_world_620b_620c [ 25.0 us ... 25.5 us ... 26.6 us ] stddev: 411.2 ns
parser_parse_small_82b_82c [ 18.7 us ... 19.2 us ... 20.8 us ] stddev: 508.7 ns
parser_parse_medium_4315b_4315c [ 95.2 us ... 96.7 us ... 113.4 us ] stddev: 3.2 us
parser_parse_large_97332b_97098c [ 1.0 ms ... 1.0 ms ... 1.0 ms ] stddev: 3.8 us
Compiling nu-cmd-lang v0.112.3 (/Users/fdncred/src/nushell/crates/nu-cmd-lang)
Compiling nu-test-support v0.112.3 (/Users/fdncred/src/nushell/crates/nu-test-support)
Compiling nu v0.112.3 (/Users/fdncred/src/nushell)
Finished `bench` profile [optimized] target(s) in 1m 12s
Running benches/benchmarks.rs (target/release/deps/benchmarks-5a8a0256451b1c57)
```
<!--
Explain what this PR does and why.
This section is intentionally flexible:
- Describe the problem
- Explain your approach
- Include technical details if relevant
Good examples:
- "In this PR, I fixed..."
- "In this PR, I added support for..."
- "This change improves X by..."
Write as much or as little as needed for reviewers to understand your
changes.
-->
## User-facing changes (Release notes)
Run the new parser benchmarks like this:
```nushell
nu scripts/parser-bench-run.nu
```
The `parser-bench-run.nu` script has these arguments.
```nushell
--filter: string = "parser_*" # benchmark name glob filter (tango uses glob matching)
--bench: string = "benchmarks" # bench target name
--out-dir: path = "target/parser-bench" # directory where logs are written
```
Analyze the new parser benchmarks like this:
```nushell
nu scripts/parser-bench-throughput.nu target/parser-bench/benchmarks-parser__-20260519-125213.log
```
The `parser-bench-throughput.nu` script has these arguments
```nushell
log_file?: path # output file produced by parser-bench-0.112.2-run.nu
--name-prefix: string = "parser_" # benchmark name glob filter
--time-unit: string = "micro" # throughput time base: sec|milli|micro|nano
```
<!--
This section is used (mostly as-is) for https://www.nushell.sh/blog/
Describe how Nushell behavior changes from a user's perspective.
Do NOT describe internal Rust changes here.
Write in a release note style, for example:
- "Added support for..."
- "Fixed an issue where..."
- "Nushell now supports..."
- "Improved performance of..."
If your changes do NOT affect users (internal refactors, cleanup, etc.),
just write:
- "n/a"
- "nan"
- or similar
This tells us the change should not appear in the changelog.
Tips:
- Focus on observable behavior
- Include examples if helpful
- Keep it concise
You can:
- Write a short paragraph (will appear as a bullet point), OR
- Use headings (###) if your change needs more structure
Avoid writing things like:
- "In this PR, I refactored..."
- "This updates internal code..."
You may leave this blank until the PR is ready.
-->
## Additional notes
<!--
Optional.
Examples:
- fixes#123
- closes#456
- related #789
Anything else reviewers should know.
Remove this section if not needed.
-->
## Release notes summary - What our users need to know
### Cross-platform clipboard command
This PR integrates
[nu_plugin_clipboard](https://github.com/fmotalleb/nu_plugin_clipboard)
into Nushell as a built-in internal command.
Migrating from an external plugin required several changes across the
codebase and internal APIs. Because of this, the current implementation
may not be completely stable and will likely need further testing and
debugging.
This PR prioritizes integration over stability, and additional fixes are
expected in follow-up work.
Examples:
```
# Copy data to the clipboard
~> "data" | clip copy
# Pass through the copied data
~> "data" | clip copy --show | save out.txt
# Retrieve data from the clipboard
~> clip paste
```
Like the original plugin, it can automatically convert objects and
arrays to and from JSON.
This behavior can be disabled using the `--raw` flag on the `paste`
subcommand.
However, to copy a raw value, you must explicitly cast it to a string.
Note: this feature could be removed to keep the command simpler and
aligned with a single-responsibility design, but it's a nice-to-have
thing.
Closes: #16242
## Tasks after merging
- [ ] Update the documentation:
https://github.com/nushell/nushell.github.io
- [ ] Remove the legacy std/clip script
---------
Co-authored-by: Motalleb Fallahnezhad <fmotalleb@dornica.net>
Updating nixpkgs
Latest devshell variant can be used with either:
* using nix directly: `nix develop ./scripts/nix#latest`
* using direnv: `"use flake ./scripts/nix#latest" | save -f .envrc`
---
Probably something that I should make a PR for whenever a release is
coming up.
## Release notes summary - What our users need to know
## Tasks after submitting
- [ ] Update the
[documentation](https://github.com/nushell/nushell.github.io)
This PR helps nushell on Windows to compile without a build warning from
the winresource crate.
## Release notes summary - What our users need to know
N/A
## Tasks after submitting
When bumping versions in the future, make sure to bump these two new
versions as well.
I saw #10945 and added some notes in the `scripts/nix/README.md` file on
how to use it properly in the non-root directory. Closes#10352.
---
Allows including in another flake using the `...?dir=scripts/nix` option
on the flake url. Some common uses in the repo:
```console
$ # Build nushell
$ nix build ./scripts/nix
$ # Enter the development shell (sadly it's bash, use .envrc for nu)
$ nix develop ./scripts/nix
$ # Enable direnv for this project
$ "use flake ./scripts/nix" | save -a ./.envrc
```
Everything else should be nicely extracted from the
`rust-toolchain.toml` and `Cargo.toml`s around the repo, making changes
outside the nix directory require almost no intervention, unless
dependencies change or a new plugin is added.
---
<!--
Thank you for improving Nushell!
Please, read our contributing guide:
https://github.com/nushell/nushell/blob/main/CONTRIBUTING.md
-->
## Release notes summary - What our users need to know
<!--
This section will be included as part of our release notes. See the
contributing guide for more details.
Please include only details relevant for users here. Motivation and
technical details can be added above or below this section.
You may leave this section blank until your PR is finalized. Ask a core
team member if you need help filling this section.
-->
## Tasks after submitting
<!-- Remove any tasks which aren't relevant for your PR, or add your own
-->
- [ ] Update the
[documentation](https://github.com/nushell/nushell.github.io)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx
you can also mention related issues, PRs or discussions!
-->
# Description
<!--
Thank you for improving Nushell. Please, check our [contributing
guide](../CONTRIBUTING.md) and talk to the core team before making major
changes.
Description of your pull request goes here. **Provide examples and/or
screenshots** if your changes affect the user experience.
-->
Publishing Nushell to winget has always been a challenge for us, and to
this day, many issues remain unresolved—and some seem almost impossible
to fix. The road to solving these problems may be winding and long, but
it's time for us to set out on this journey.
This PR try to fix the Windows arm64 release binaries and some `winget`
related issues:
- [x] Fixes https://github.com/nushell/nushell/issues/14815: build
Windows arm64 binaries by Windows arm64 runner
- [x] Upgrade WiX Toolset to latest 6.0 version: WiX 3 we used currently
doesn't support arm64 arch and [WiX v4 Security Fixes End Date is
2025/02/05](https://docs.firegiant.com/wix/)
- [x] Update the **nightly** workflow to make it work for all future
releases
- [x] Update the **release** workflow to make it work for all future
releases
- [x] Fixes https://github.com/nushell/nushell/issues/15698
- [x] Fixes https://github.com/nushell/nushell/issues/13719 so that
Nushell should be possible to be installed via winget with both user and
machine scope
- [x] Fixes https://github.com/nushell/nushell/issues/5927
- [x] Try to fix https://github.com/nushell/nushell/issues/14786
- [x] Fixes https://github.com/nushell/nushell/issues/9537
## Related but not planed issues:
- Related https://github.com/nushell/nushell/issues/13017
- Related https://github.com/nushell/nushell/issues/8053
# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->
- Nushell should be possible to be installed via winget with both user
and machine scope and The default should be user scope
- User scope install by winget: `winget install Nushell.Nushell`
- User scope install by msiexec: `msiexec /i
nu-0.104.1-x86_64-pc-windows-msvc.msi /quiet /qn`
- Machine scope install by winget: `winget install Nushell.Nushell
--override 'ALLUSERS=1'`
- Machine scope install by msiexec: `msiexec /i
nu-0.104.1-x86_64-pc-windows-msvc.msi ALLUSERS=1`
- Note that `--scope` flag for `winget install` does not work use
`--override` instead
- Default user scope install dir:
`$'($nu.home-path)\AppData\Local\Programs\nu\'`
- Default machine scope install dir: `C:\Program Files\nu\`
- When a standard user runs the installer and selects "Install for
everyone" (per-machine installation), Windows will automatically trigger
a UAC prompt, the user can enter admin credentials and the installation
will proceed with elevated privileges
- [hustcer/setup-nu](https://github.com/hustcer/setup-nu) should work
for `windows-11-arm` runners
# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.
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 --workspace -- -D warnings -D clippy::unwrap_used` to
check that you're using the standard code style
- `cargo test --workspace` to check that all tests pass (on Windows make
sure to [enable developer
mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging))
- `cargo run -- -c "use toolkit.nu; toolkit test stdlib"` to run the
tests for the standard library
> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->
The latest MSI builds are available here:
https://github.com/nushell/nightly/releases/tag/v0.104.1
Actually all the nightly releases were built with latest changes
included: https://github.com/nushell/nightly/releases
`winget` and `msiexec` install tests goes here:
https://github.com/nushell/integrations/pull/49https://github.com/nushell/integrations/actions/runs/14974621061https://github.com/nushell/integrations/actions/runs/14974621054
### Test winget install locally:
- git clone git@github.com:nushell/integrations.git
- User scope install: `winget install -m
manifests\n\Nushell\Nushell\0.104.1\`
- Run: `use tests\common.nu *; check-user-install`
- Machine scope install: `winget install -m
manifests\n\Nushell\Nushell\0.104.1\ --override 'ALLUSERS=1'`
- Run: `use tests\common.nu *; check-local-machine-install`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
@fdncred I suggest releasing a patch version after merging this PR (only
the changes of this PR will be included) to ensure that the winget
release process works properly. This way, we can be more confident when
releasing version 0.105.0.
References:
-
https://learn.microsoft.com/en-us/windows/win32/msi/single-package-authoring
-
https://learn.microsoft.com/en-us/windows/package-manager/winget/source#add
-
https://github.com/microsoft/winget-pkgs/blob/master/doc/tools/SandboxTest.md
- https://docs.firegiant.com/quick-start/
-
https://docs.firegiant.com/wix3/tutorial/getting-started/putting-it-to-use/#_top
-
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/msiexec#set-public-properties
- Add `nu_plugin_polars` to the list of plugins in
`build-all-maclin.sh`.
- Add `nu_plugin_polars` to the list of plugins in `build-all.nu`.
- Add `nu_plugin_polars` to the list of plugins in `install-all.ps1`.
- Add `nu_plugin_polars` to the list of plugins in `install-all.sh`.
- Add `nu_plugin_polars` to the list of plugins in `uninstall-all.sh`.
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx
you can also mention related issues, PRs or discussions!
-->
# Description
<!--
Thank you for improving Nushell. Please, check our [contributing
guide](../CONTRIBUTING.md) and talk to the core team before making major
changes.
Description of your pull request goes here. **Provide examples and/or
screenshots** if your changes affect the user experience.
-->
# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->
# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.
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 --workspace -- -D warnings -D clippy::unwrap_used` to
check that you're using the standard code style
- `cargo test --workspace` to check that all tests pass (on Windows make
sure to [enable developer
mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging))
- `cargo run -- -c "use toolkit.nu; toolkit test stdlib"` to run the
tests for the standard library
> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
# Description
<!--
Thank you for improving Nushell. Please, check our [contributing
guide](../CONTRIBUTING.md) and talk to the core team before making major
changes.
Description of your pull request goes here. **Provide examples and/or
screenshots** if your changes affect the user experience.
-->
The build script is currently re-run on each `cargo build` even when it
has not changed. The `rerun-if-changed` line points to `/build.rs`, but
`build.rs` is actually located at `/scripts/build.rs`. This updates that
path.
# User-Facing Changes
N/A
# Tests + Formatting
N/A
# Description
Removes the old `nu-cmd-dataframe` crate in favor of the polars plugin.
As such, this PR also removes the `dataframe` feature, related CI, and
full releases of nushell.
# Description
This PR migrates the benchmark suit to Tango. Its different compared to
other framework because it require 2 binaries, to run to do A/B
benchmarking, this is currently limited to Linux, Max, (Windows require
rustc nightly flag), by switching between two suits it can reduce noise
and run the code "almost" concurrently. I have have been in contact with
the maintainer, and bases this on the dev branch, as it had a newer API
simular to criterion. This framework compared to Divan also have a
simple file dump system if we want to generate graphs, do other analysis
on later. I think overall this crate is very nice, a lot faster to
compile and run then criterion, that's for sure.
# Description
The intended effect of the `extra` feature has been undermined by
introducing the full builds on our release pages and having more
activity on some of the extra commands.
To simplify the feature matrix let's get rid of it and focus our effort
on truly either refining a command to well-specified behavior or
discarding it entirely from the `nu` binary and moving it into plugins.
## Details
- Remove `--features extra` from CI
- Don't explicitly name `extra` in full build wf
- Remove feature extra from build-help scripts
- Update README in `nu-cmd-extra`
- Remove feature `extra`
- Fix previously dead `format pattern` tests
- Relax signature of `to html`
- Fix/ignore `html::test_no_color_flag`
- Remove dead features from `version`
- Refine `to html` type signature
# User-Facing Changes
The commands that were previously only available when building with
`--features extra` will now be available to everyone. This increases the
number of dependencies slightly but has a limited impact on the overall
binary size.
# Tests + Formatting
Some tests that were left in `nu-command` during cratification were dead
because the feature was not passed to `nu-command` and only to
`nu-cmd-lang` for feature-flag mention in `version`.
Those tests have now been either fixed or ignored in one case.
# After Submitting
There may be places in the documentation where we point to `--features
extra` that will now be moot (apart from the generated command help)
# Description
* The path to the binaries for tests is slightly incorrect. It is
missing the build target when it is set with the `CARGO_BUILD_TARGET`
environment variable. For example, when `CARGO_BUILD_TARGET` is set to
`aarch64-linux-android`, the path to the `nu` binary is:
`./target/aarch64-linux-android/debug/nu`
rather than
`./target/debug/nu`
This is common on Termux since the default target that rustc detects can
cause problems on some projects, such as [python's `cryptography`
package](https://github.com/pyca/cryptography/issues/7248).
This technically isn't a problem specific to Android, but is more likely
to happen on Android due to the latter.
* Additionally, the existing variable named `NUSHELL_CARGO_TARGET` is in
fact the profile, not the build target, so this was renamed to
`NUSHELL_CARGO_PROFILE`. This change is included because without the
rename, the build system would be using `CARGO_BUILD_TARGET` for the
build target and `NUSHELL_CARGO_TARGET` for the build profile, which is
confusing.
* `std path add` tests were missing `android` test
# User-Facing Changes
For those who would like to build nushell on Termux, the unit tests will
pass now.
# Description
This PR updates the toolkit and the build/install scripts to include
`--locked`, also added `extra` feature to the _all_ scripts, and
`--force` to the install scripts.
# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->
# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.
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 --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect -A clippy::result_large_err` to check that
you're using the standard code style
- `cargo test --workspace` to check that all tests pass
- `cargo run -- -c "use std testing; testing run-tests --path
crates/nu-std"` to run the tests for the standard library
> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
# Description
For years, Nushell has used `let-env` to set a single environment
variable. As our work on scoping continued, we refined what it meant for
a variable to be in scope using `let` but never updated how `let-env`
would work. Instead, `let-env` confusingly created mutations to the
command's copy of `$env`.
So, to help fix the mental model and point people to the right way of
thinking about what changing the environment means, this PR removes
`let-env` to encourage people to think of it as updating the command's
environment variable via mutation.
Before:
```
let-env FOO = "BAR"
```
Now:
```
$env.FOO = "BAR"
```
It's also a good reminder that the environment owned by the command is
in the `$env` variable rather than global like it is in other shells.
# User-Facing Changes
BREAKING CHANGE BREAKING CHANGE
This completely removes `let-env FOO = "BAR"` so that we can focus on
`$env.FOO = "BAR"`.
# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.
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 --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect -A clippy::result_large_err` to check that
you're using the standard code style
- `cargo test --workspace` to check that all tests pass
- `cargo run -- crates/nu-std/tests/run.nu` to run the tests for the
standard library
> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->
# After / Before Submitting
integration scripts to update:
- ✔️
[starship](https://github.com/starship/starship/blob/master/src/init/starship.nu)
- ✔️
[virtualenv](https://github.com/pypa/virtualenv/blob/main/src/virtualenv/activation/nushell/activate.nu)
- ✔️
[atuin](https://github.com/ellie/atuin/blob/main/atuin/src/shell/atuin.nu)
(PR: https://github.com/ellie/atuin/pull/1080)
- ❌
[zoxide](https://github.com/ajeetdsouza/zoxide/blob/main/templates/nushell.txt)
(PR: https://github.com/ajeetdsouza/zoxide/pull/587)
- ✔️
[oh-my-posh](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/src/shell/scripts/omp.nu)
(pr: https://github.com/JanDeDobbeleer/oh-my-posh/pull/4011)
# Description
i was installing Nushell and, as we have the `dataframe` feature and
very soon at least the `extra` feature with more and more commands, i
thought it could be cool to have a little `toolkit install` command
😋
# User-Facing Changes
exposes the following command to developers
```
install Nushell and features you want
Usage:
> install ...(features)
Flags:
-h, --help - Display the help message for this command
Parameters:
...features <string>: a space-separated list of feature to install with Nushell
```
# Tests + Formatting
- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- ⚫ `toolkit test`
- ⚫ `toolkit test stdlib`
# After Submitting
```
$nothing
```
# Description
i've almost always wanted to clean up the root of the repo, so here is
my take at it, with some important advice given by @fdncred 😌
- `README.release.txt` is now gone and directly inline in the
`release-pkg` script used in the `release` *workflow*
- `build.rs` has been moved to `scripts/` and its path has been changed
in
[`Cargo.toml`](https://github.com/amtoine/nushell/blob/refactor/clean-root/Cargo.toml#L3)
according to the [*Build Scripts*
section](https://doc.rust-lang.org/cargo/reference/build-scripts.html#build-scripts)
of *The Cargo Book*
- i've merged `images/` into `assets/` and fix the only mention to the
GIF in the README
- i've moved the `docs/README.md` inside the main `README.md` as a new
[*Configuration*
section](https://github.com/amtoine/nushell/tree/refactor/clean-root#configuration)
- the very deprecated `pkg_mgrs/` has been removed
- all the `.nu`, `.sh`, `.ps1` and `.cmd` scripts have been moved to
`scripts/`
### things i've left as-is
- all the other `.md` documents
- the configuration files
- all the Rust and core stuff
- `docker/`
- `toolkit.nu`
- the `wix/` diretory which appears to be important for `winget`
# User-Facing Changes
scripts that used to rely on the paths to some of the scripts should now
call the scripts inside `scripts/` => i think this for the greater good,
it was not pretty nor scalable to have a bunch of scripts in the root of
our main `nushell` 😱
*i even think we might want to move these scripts outside the main
`nushell` repo*
maybe to `nu_scripts` or some other tool 👍
# Tests + Formatting
- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- ⚫ `toolkit test`
- ⚫ `toolkit test stdlib`
# After Submitting
```
$nothing
```