Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should the submodules be *subcommands* instead? #100

Open
NotTheDr01ds opened this issue Sep 26, 2024 · 0 comments
Open

Should the submodules be *subcommands* instead? #100

NotTheDr01ds opened this issue Sep 26, 2024 · 0 comments

Comments

@NotTheDr01ds
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant