-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Proposal: Better shell completions #6645
Copy link
Copy link
Closed
Labels
A-completionsArea: shell completionsArea: shell completionsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Metadata
Metadata
Assignees
Labels
A-completionsArea: shell completionsArea: shell completionsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Type
Fields
Give feedbackNo fields configured for issues without a type.
This is a proposal to add better shell completion support to Cargo. The outline of the strategy is:
cargo completionssubcommand to assist with completion support.cargo completions <shell>will output a completion script for the given shell (bash, zsh, etc.).cargo completionsto implement the work of actually emitting completions. This can significantly simplify the work of supporting completions for different shells. The completion script is very small (seenpm completionfor an example). This also means all the logic can be written in one language (Rust) and can be more easily tested.Benefits:
--binor--examplecompleting the target name).Drawbacks:
Please let me know if you have any thoughts or objections.