4

Does Oclif support making a call to an API and getting the values returned in order to be used for autocomplete? I have the following use case:

  • Multiple users are stored in a database
  • When the user presses show users <Tab> <Tab>, the CLI should make a call to an API that returns all available users.
  • The CLI should use the values returned from the API.
  • The user can then select a user name, for example show users user0001.

Is this possible in Oclif?

1 Answer 1

2

'It is not possible in Oclif, however the Heroku CLI does this. Check out https://github.com/heroku/cli/tree/master/packages/autocomplete for more information.'

This is the answer from Oclif team regarding this issue. https://github.com/oclif/oclif/issues/332

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.