-
Notifications
You must be signed in to change notification settings - Fork 2
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
Generate a bash_completion file on run #7
Comments
Another example implementation: |
@twof the idea in #1347 is when you build a CLI e.g. Toolbox, you can include our template completion for bash and zsh in e.g. Homebrew. The PR adds a |
So if I'm understanding correctly, SPM has a static bash_completion file, and vapor gets a list of the commands available and generates it on the fly? |
More or less. With the PR in Vapor, you will need to have the bash_completion file on your Mac/Linux .. This file will load available commands from the CLI script. E.g. In the toolbox, it will automatically download and setup the autocompletion file on your computer in Homebrew/APT We will also provide examples of bash completion files for people building their own CLI scripts :) .. This way it's easy to customize the bash completion file for your script if you want :) Later we will also provide examples for zsh completion :) |
Awesome! Thanks for the explanation |
No problem :) .. Thought that would be the most flexible solution, and still keep loyal to the *nix system :) and have a really easy setup/maintenance |
I think that's what's happening here:
https://github.com/apple/swift-package-manager/blob/master/Sources/Commands/Completions%2Bbash.swift
The text was updated successfully, but these errors were encountered: