与雷神互动提示
我想以某种方式要求用户说出他们的 flickr_id、flickr_apikey 等内容,但我最乐意在我的安装命令下执行此操作,这样它就不会因为所有参数而成为如此长而粗的行。
诸如此类的事情
$ thor PhotoonRails:install
We're about to install your system.. blaa, blaa, blaa...
We have to know you're Flick ID, get i here http://idgettr.com/
Flickr ID: {here you should type your id}
We also has to know you're flick api key, make one here ...
API Key: {here you should type your key}
?你明白这个想法了吗?可以实现吗?
I want to somehow ask the user to say their flickr_id, flickr_apikey and that stuff, but id' be most happy to do it under my install command so it dosn't end up being such a long and heavy line because of alle the arguments.
so something like
$ thor PhotoonRails:install
We're about to install your system.. blaa, blaa, blaa...
We have to know you're Flick ID, get i here http://idgettr.com/
Flickr ID: {here you should type your id}
We also has to know you're flick api key, make one here ...
API Key: {here you should type your key}
and so on? Do you get the idea, and can it be done?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确实可以!
您正在寻找
询问
。一个例子:
Indeed it can!
You are looking for
ask
.An example:
还可以将颜色设置为符号
Thor 可用颜色的完整列表,此处: http://www.rubydoc.info/github/wycats/thor/Thor/Shell/Color
It's also possible to set color as a symbol
Full list of available colors for Thor, here: http://www.rubydoc.info/github/wycats/thor/Thor/Shell/Color