Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !277

Adds a simple bash completion script

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Jim Schubert requested to merge github/fork/jimschubert/bash-completion-script into master Jun 10, 2018
  • Overview 0
  • Commits 3
  • Pipelines 0
  • Changes 3

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:

brew install bash-completion

Rather than permanently installing the completion script, you can just source it in your current shell session:

source openapi-generator-cli-completion.bash

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

  • Read the contribution guidelines.
  • Ran the shell script under ./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\.
  • Filed the PR against the correct branch: Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

(details of the change, additional tests that have been done, reference to the issue for tracking, etc)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jimschubert/bash-completion-script