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
Comments
Cool idea... it should be easy to implement the completions command. |
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. |
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 🙂 |
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. |
Comment by Félix Fischer (JIRA) Ohh, I see. Nice ^^ |
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. |
Additional Detail from JIRA
md5: 8d3479aa5a53f3240c8aed0f5bd2ce73
relates to:
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.
The text was updated successfully, but these errors were encountered: