-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Adds a simple bash completion script #277
Adds a simple bash completion script #277
Conversation
This works with any loading script named openapi-generator-cli. That is, if you've installed via homebrew or created a script similar to https://gist.github.com/jimschubert/ce241b0c78140e364f46914ef8ec4103 This script is relatively simple, relying on fallback to the recently add "completion" command to the CLI project. The script includes a possible extension to allow for per-language options to autocomplete when the user is applying additional properties. This work is currently commented out, as it may be simplified a bit in the CLI first.
Shall we add |
@wing328 we could, but I think the script would need some touching up (like make it so that it queries the latest tag from github as the default version). It's unrelated to the bash completions in this PR, so I wouldn't wait on me updating that script to merge this PR. |
@wing328 I've modified https://gist.github.com/jimschubert/ce241b0c78140e364f46914ef8ec4103 to pull (or reuse) the latest released tag by default. Let me know what you think, and I can add it to this PR. |
@wing328 I went ahead and added that launcher script. It's a great idea, and updating it wasn't as complicated as I thought it would be. |
@jimschubert thanks. I'll give it a try tomorrow and merge accordingly. |
* Adds a simple bash completion script This works with any loading script named openapi-generator-cli. That is, if you've installed via homebrew or created a script similar to https://gist.github.com/jimschubert/ce241b0c78140e364f46914ef8ec4103 This script is relatively simple, relying on fallback to the recently add "completion" command to the CLI project. The script includes a possible extension to allow for per-language options to autocomplete when the user is applying additional properties. This work is currently commented out, as it may be simplified a bit in the CLI first. * Add launcher script and "install" instructions
…commitlint-monorepo chore(deps): update commitlint monorepo to v12 (major)
This works with any loading script named openapi-generator-cli.
That is, if you've installed via homebrew or created a script similar
to https://gist.github.com/jimschubert/ce241b0c78140e364f46914ef8ec4103
This script is relatively simple, relying on fallback to the recently
add "completion" command to the CLI project.
The script includes a possible extension to allow for per-language
options to autocomplete when the user is applying additional properties.
This work is currently commented out, as it may be simplified a bit in
the CLI first.
To evaluate, you'll need the script from the gist mentioned above saved somewhere on your path and made executable (
chmod u+x openapi-generator-cli
). Then install bash completions if you don't already have it installed:Rather than permanently installing the completion script, you can just source it in your current shell session:
Now you can TABTAB for autocomplete suggestions.
@wing328 we'll want to add this to homebrew, but this will only be available after the next artifact is released.
see #214
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
.Description of the PR
(details of the change, additional tests that have been done, reference to the issue for tracking, etc)