mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +00:00
e77a0a48aa
# Description This PR does three related changes: * Keeps the originally declared name in help outputs. * Updates the name of the commands called `main` in the user script to the name of the script. * Fixes the source of signature information in multiple places. This allows scripts to have more complete help output. Combined, the above allow the user to see the script name in the help output of scripts, like so: ![image](https://github.com/nushell/nushell/assets/547158/741d192c-0a39-45a7-8f36-3a0dc8eeae2b) NOTE: You still declare and call the definition `main`, so from inside the script `main` is still the correct name. But multiple folks agreed that seeing `main` in the script help was confusing, so this PR changes that. # User-Facing Changes One potential minor breaking change is that module renames will be shown as their originally defined name rather than the renamed name. I believe this to be a better default. # 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. --> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
LICENSE |