mirror of
https://github.com/nushell/nushell.git
synced 2026-10-28 08:54:52 +08:00
## 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. -->
run the scripts
Note
the following table must be read as follows:
- an
xmeans it works- a
?means no data available
.nuscripts must be run asnu .../foo.nu
.shscripts must be run as./.../foo.sh
.ps1scripts must be run aspowershell .../foo.ps1let's say a script is called
foo
- an
xin the./scriptscolumn meansfoocan be run from./scripts- an
xin the root column meansfoocan be run from the root ofnushell- an
xin the anywhere column meansfoocan be run from anywhere!
| script | ./scripts/ |
root | anywhere |
|---|---|---|---|
build-all-maclin.sh |
x | x | x |
build-all-windows.cmd |
? | x | ? |
build-all.nu |
x | x | x |
coverage-local.nu |
x | x | x |
coverage-local.sh |
x | x | x |
install-all.ps1 |
? | x | ? |
install-all.sh |
x | x | x |
uninstall-all.sh |
x | x | x |