[英]Oclif dynamic autocomplete with http call
Does Oclif support making a call to an API and getting the values returned in order to be used for autocomplete? Oclif 是否支持调用 API 并获取返回值以用于自动完成? I have the following use case:
我有以下用例:
show users <Tab> <Tab>
, the CLI should make a call to an API that returns all available users.show users <Tab> <Tab>
,CLI 应调用返回所有可用用户的 API。show users user0001
.show users user0001
。 Is this possible in Oclif?这在 Oclif 中可能吗?
'It is not possible in Oclif, however the Heroku CLI does this. '这在 Oclif 中是不可能的,但是 Heroku CLI 可以做到这一点。 Check outhttps://github.com/heroku/cli/tree/master/packages/autocomplete for more information.'
查看https://github.com/heroku/cli/tree/master/packages/autocomplete了解更多信息。
This is the answer from Oclif team regarding this issue.这是 Oclif 团队对这个问题的回答。 https://github.com/oclif/oclif/issues/332
https://github.com/oclif/oclif/issues/332
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.