Add clickable Link prompt
Sometimes we want to show a clickable link to the user, so this PR adds the "link" functionality, which is supported by most current terminals on Linux and macOS.
link(
message: 'Visit Laravel documentation:',
path: 'https://laravel.com/docs',
tooltip: 'Click here'
);
IMO this seems out of scope for this project.
@weitzman If prompts supports colours (which is extended terminal capability), why it should not support links?
These links are great in CLI apps, but its not a Prompt IMO. There is no interactivity. I guess there are Informational Messages and Tables and other bits in this package that have no interactivity so the maintainers should feel free to include this.
@luanfreitasdev I've read the code more carefully. Looks like the link is its own element. Is it possible to implement it as a formatter which could be used within existing textual parts of any prompt component? E.g., in hints or labels
@luanfreitasdev I've read the code more carefully. Looks like the link is its own element. Is it possible to implement it as a formatter which could be used within existing textual parts of any prompt component? E.g., in hints or labels
I understand. Any ideas for an API with a display sample?
Updated:
Ready for review