Skip to content

Cargo --list group installed and alias #12719

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

Closed
Hellzbellz123 opened this issue Sep 21, 2023 · 3 comments
Closed

Cargo --list group installed and alias #12719

Hellzbellz123 opened this issue Sep 21, 2023 · 3 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.

Comments

@Hellzbellz123
Copy link

Hellzbellz123 commented Sep 21, 2023

Problem

When running cargo without a command it shows a --list option. This lists "all commands", however the text that shows implies that they are installed. This can be confusing and less helpful.

the --list command should show the different types in groups, this data is already dealt with in the function that writes too console, so it should be quick and easy, in fact i have a pr ready too submit but i'm kind of new too rust so i'm not sure if this is the best way too do this and would like some input

Proposed Solution

https://github.com/Hellzbellz123/cargo/tree/fix-list

cargo --list should group aliases, built in commands and installed commands separately
output of cargo --list should look as below
❯ cargo run -- --list
Finished dev [unoptimized + debuginfo] target(s) in 0.12s
Running target/debug/cargo --list
Configured Aliases:
t alias: alias: test
bump-check alias: run --package xtask-bump-check --
....
Built-In Commands:
yank Remove a pushed crate from the index
add Add dependencies to a Cargo.toml manifest file
....
Installed Commands:
zigbuild
xwin
.....

Notes

No response

@Hellzbellz123 Hellzbellz123 added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage. labels Sep 21, 2023
@weihanglo
Copy link
Member

Seems like pretty much similar to #12114 and effectively the same as #12093?

@weihanglo
Copy link
Member

weihanglo commented Sep 21, 2023

See also #12196 (review)

tl;dr: changing it would break users relying on shell completions.|

Anyway, I really appreciate the effort!

@Hellzbellz123
Copy link
Author

I searched for --list and list but missed those particular issues, closing as duplicate
My apologies

@Hellzbellz123 Hellzbellz123 reopened this Sep 21, 2023
@Hellzbellz123 Hellzbellz123 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

2 participants