Markup and rich formatting in click.echo
See original GitHub issueIs there any way to print rich-formatted types and text in the body of a command with click.echo
?
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Utilities — Click Documentation (7.x)
The most obvious helper is the echo() function, which in many ways works like the Python print statement or function. The main difference...
Read more >Printing and Colors - Typer - tiangolo
Rich also supports a custom markup syntax to set colors and styles, for example: ... typer.echo() (which is actually just click.echo() ) applies...
Read more >Console Markup — Rich 12.6.0 documentation
Rich supports a simple markup which you can use to insert color and styles virtually everywhere Rich would accept a string (e.g. print()...
Read more >Speech Synthesis Markup Language (SSML) Reference
SSML is a markup language that provides a standard way to mark up text for the generation of ... <speak> <amazon:domain name="long-form"> Meet...
Read more >What Is the Command Line? Plain text vs. formatted text
Users with visual disabilities, click here to download the Word file. ... What is the difference between a plain text document and a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh I see! By body you just mean the output of the tool itself. This is kind of beyond the scope of rich-click as it’s no longer to do with the click command-line interface handling - it’s just the main content of your program. However I can see the confusion as you’re using a click utility function in your example (you could use this anywhere, with or without a command line interface).
Anyway, the easiest way to do this is to just use rich directly:
Does this make sense? Hope this helps!
I think regular
print()
should work as well 🤔 See the basic example which does this.Anyway, I’ll close now if you’re happy 😄 Shout if you run into any issues!