nushell / nushell/nushell

Help for `dexit` displays non-existent `Subcommands` section

Open
#13,278 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A:help-system A:std-library
Dominant language
Rust
Stars
40.5k
Forks
2.3k
Avg merge
1d 19h
Merged PRs (30d)
85

Description

Describe the bug

I think How to reproduce explains this sufficiently.

How to reproduce
  1. Run dexit --help. Observe that a Subcommands section that appears to be re-used from the drop built-in is displayed, which don't actually exist and are rejected if attempted to be used (i.e., dexit nth yields an extra positional argument error).
Expected behavior

I expect the dexit/std dirs drop command to not have a help section from an unrelated command included.

Screenshots
Screenshot 2024-06-30 at 7 42 27 PM Screenshot 2024-06-30 at 7 58 31 PM
Configuration
key value
version 0.95.0
major 0
minor 95
patch 0
branch
commit_hash
build_os macos-aarch64
build_target aarch64-apple-darwin
rust_version rustc 1.79.0 (129f3b996 2024-06-10) (Homebrew)
cargo_version cargo 1.79.0
build_time 2024-06-25 18:29:47 +00:00
build_rust_channel release
allocator mimalloc
features default, sqlite, system-clipboard, trash
installed_plugins
Additional context

I'm guessing that this is a problem because there is overlap between the resolved name of dexit (viz., std dirs drop) and the name of the drop built-in. Assuming this is true, the lack of an Examples section that would normally be present with help from the drop built-in might be due to https://github.com/nushell/nushell/issues/11067?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with dexit --help and compare it with std dirs drop; the output incorrectly includes a Subcommands section. Review the command-resolution behavior described in this issue and related issue #11067. Done means dexit --help no longer shows unrelated subcommands and still displays the appropriate help.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.