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-2142] SwiftPM command line autocompletions #5417

Closed
swift-ci opened this issue Jul 21, 2016 · 6 comments
Closed

[SR-2142] SwiftPM command line autocompletions #5417

swift-ci opened this issue Jul 21, 2016 · 6 comments

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-2142
Radar None
Original Reporter czechboy0 (JIRA User)
Type New Feature
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 2
Component/s Package Manager
Labels New Feature, StarterBug
Assignee None
Priority Medium

md5: 8d3479aa5a53f3240c8aed0f5bd2ce73

relates to:

  • SR-7843 SwiftPM completions for fish

Issue Description:

It would be great to add command line (bash, zsh, fish) autocompletions to SwiftPM. This would make working with the package manager on the command line much faster and easier.

This would require:

1. Adding a mode to SwiftPM to return completions for each specific scenario (something like `swift package completions PARAMS`, returning `build, test, package` when just `swift` is typed; `init, fetch, update, generate-xcodeproj, show-dependencies, dump-package` when `swift package` is typed, etc). This should also include modifier flags.

2. Create completions files (completions.bash/.zsh/.fish) for the most used shells, that ask for the above completions.

3. Add instructions on how to enable them in the documentation.

@ddunbar
Copy link
Member

ddunbar commented Aug 15, 2016

Cool idea... it should be easy to implement the completions command.

@Bouke
Copy link
Contributor

Bouke commented Sep 28, 2016

I've create a PR for this (#703 However this ticket assumes a "completions" command which would abstract away from the specific shell. I think it would be nicer to have specific completions tailored to the shell; so to support ZSH with it's fancier completion system.

@swift-ci
Copy link
Contributor Author

swift-ci commented Apr 6, 2017

Comment by Félix Fischer (JIRA)

Is this still unresolved? It would seem like, since Bouke's PR was merged, the feature already exists in SPM 🙂

@Bouke
Copy link
Contributor

Bouke commented Apr 8, 2017

Yes, this is still unresolved. 703 did add shell completion scripts, but they are currently very much out of date. 843 adds the ability to generate (most of) the shell completion scripts. The next step is to determine a way to generate these shell scripts automatically for every release, and including them in the toolchain. The SwiftPM team has suggested to take this up on the mailing list for discussion; it hasn't been brought up yet.

@swift-ci
Copy link
Contributor Author

swift-ci commented Apr 9, 2017

Comment by Félix Fischer (JIRA)

Ohh, I see. Nice ^^

@Bouke
Copy link
Contributor

Bouke commented Aug 17, 2017

Resolved through 1256. Instead of shipping pre-generated completion scripts, we now ship a tool to generate the completion scripts as desired. See also the Installation instructions in the documentation.

@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
Projects
None yet
Development

No branches or pull requests

3 participants