Skip to content
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

Terminal colors also for Prompt #139

Open
mdeknowis opened this issue Jul 10, 2018 · 2 comments
Open

Terminal colors also for Prompt #139

mdeknowis opened this issue Jul 10, 2018 · 2 comments

Comments

@mdeknowis
Copy link

We would like to implement similar to existing bx plugins a colored prompt with variables like this:
grafik

But UI.Prompt(message string, options *PromptOptions) does not have a format input and args as e.g. Say(format string, args ...interface{}) has.

It would be an improvement, if we would be easily able to follow the bx style.

@weieigao
Copy link
Contributor

@mdeknowis you can use fmt.Sprintf to format the message, and then call ui.Prompt.
The reason why UI.Prompt does not have format and args is args ...interface{} must be the last param, but I'd rather PromptOptions be the last since it's optional.

@mdeknowis
Copy link
Author

That's a pity. Currently we try to avoid such mixtures and try to use only one stdio interface. Hence, we will not be behave like the other bx plugin. We hope, the IBM SDK will provide somthing in future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants