Should the submodules be *subcommands* instead?
Nobody has claimed this yet.
- Dominant language
- Nushell
- Stars
- 335
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
Description
With nupm loaded, scope modules shows:
╭───┬──────┬────────────────────────┬────────────────┬────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬──────────────┬─────╮
│ # │ name │ commands │ aliases │ externs │ submodules │ constants │ ... │
├───┼──────┼────────────────────────┼────────────────┼────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼─────┤
│ 0 │ nupm │ ╭───┬──────┬─────────╮ │ [list 0 items] │ [list 0 items] │ ╭───┬─────────┬───────────────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬───────────────┬─────────────┬─────╮ │ [list 0 │ ... │
│ │ │ │ # │ name │ decl_id │ │ │ │ │ # │ name │ commands │ aliases │ externs │ submodules │ constants │ has_env_block │ description │ ... │ │ items] │ │
│ │ │ ├───┼──────┼─────────┤ │ │ │ ├───┼─────────┼───────────────────────────┼────────────────┼────────────────┼────────────────┼────────────────┼───────────────┼─────────────┼─────┤ │ │ │
│ │ │ │ 0 │ nupm │ 614 │ │ │ │ │ 0 │ install │ ╭───┬─────────┬─────────╮ │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ false │ │ ... │ │ │ │
│ │ │ ╰───┴──────┴─────────╯ │ │ │ │ │ │ │ # │ name │ decl_id │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ├───┼─────────┼─────────┤ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ 0 │ install │ 625 │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ╰───┴─────────┴─────────╯ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ 1 │ publish │ ╭───┬─────────┬─────────╮ │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ false │ │ ... │ │ │ │
│ │ │ │ │ │ │ │ │ │ # │ name │ decl_id │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ├───┼─────────┼─────────┤ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ 0 │ publish │ 641 │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ╰───┴─────────┴─────────╯ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ 2 │ search │ ╭───┬────────┬─────────╮ │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ false │ │ ... │ │ │ │
│ │ │ │ │ │ │ │ │ │ # │ name │ decl_id │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ├───┼────────┼─────────┤ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ 0 │ search │ 647 │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ╰───┴────────┴─────────╯ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ 3 │ status │ ╭───┬────────┬─────────╮ │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ false │ │ ... │ │ │ │
│ │ │ │ │ │ │ │ │ │ # │ name │ decl_id │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ├───┼────────┼─────────┤ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ 0 │ status │ 648 │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ╰───┴────────┴─────────╯ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ 4 │ test │ ╭───┬──────┬─────────╮ │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ false │ │ ... │ │ │ │
│ │ │ │ │ │ │ │ │ │ # │ name │ decl_id │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ├───┼──────┼─────────┤ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ 0 │ test │ 649 │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ╰───┴──────┴─────────╯ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ╰───┴─────────┴───────────────────────────┴────────────────┴────────────────┴────────────────┴────────────────┴───────────────┴─────────────┴─────╯ │ │ │
╰───┴──────┴────────────────────────┴────────────────┴────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────┴─────╯
Is there any technical reason why these are exported as submodules rather than subcommands?
I'd be happy to submit a PR to restructure if there's no technical reason. There shouldn't be any functional difference; just that scope modules would be a lot cleaner.
Steps to reproduce
scope modules | where name == nupm | wslClip
Version
NUPM version 0.2.0
| key | value |
|---|---|
| version | 0.98.0 |
| major | 0 |
| minor | 98 |
| patch | 0 |
| branch | |
| commit_hash | |
| build_os | linux-x86_64 |
| build_target | x86_64-unknown-linux-gnu |
| rust_version | rustc 1.80.1 (3f5fd8dd4 2024-08-06) |
| rust_channel | stable-x86_64-unknown-linux-gnu |
| cargo_version | cargo 1.80.1 (376290515 2024-07-16) |
| build_time | 2024-09-18 16:11:39 -04:00 |
| build_rust_channel | release |
| allocator | mimalloc |
| features | default, sqlite, trash |
| installed_plugins | nuplugin 0.98.0 |
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported scope modules | where name == nupm output with NUPM 0.2.0 and inspect how nupm exports its modules and commands. Confirm whether changing the exports to subcommands preserves current behavior; done means the scope output is cleaner without functional regressions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100