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

[SR-10794] Have SwiftPM suggest close commands #4706

Closed
hartbit opened this issue May 29, 2019 · 1 comment
Closed

[SR-10794] Have SwiftPM suggest close commands #4706

hartbit opened this issue May 29, 2019 · 1 comment
Labels

Comments

@hartbit
Copy link
Collaborator

hartbit commented May 29, 2019

Previous ID SR-10794
Radar None
Original Reporter @hartbit
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: b19bc070247bf50f8ed031dab4bb7a15

Issue Description:

When SwiftPM is run with an invalid command, it could be caused by a typo or because the user does not remember the precise command. By having SwiftPM detect those cases and suggest the correct command, SwiftPM would be more friendly to use.

This feature could be implemented by modifying ArgumentParser to use the new Ordered Collection Diffing API in Swift 5.1 to compare the invalid command to the available commands and suggest on close matches.

Here's an example what it could look like:

$ swift build --packagepath ../path
error: unknown option --packagepath; use --help to list available options
Did you mean --package-path?
@ankitspd
Copy link
Member

#2144

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants