Replies: 3 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks, that works for error boxes, but doesn't seem to work for everything: #!/usr/bin/env python
import logging, typer
from rich.logging import RichHandler, Console
from rich.panel import Panel
typer.rich_utils.Panel = Panel.fit
app = typer.Typer(rich_markup_mode="markdown")
@app.callback()
def main( ctx: typer.Context):
logging.basicConfig(
handlers=[RichHandler(console=Console(width=120))],
)
if __name__ == "__main__":
app() |
Beta Was this translation helpful? Give feedback.
0 replies
-
Closing this as duplicate of #607 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
When using rich markdown formatting in a wide terminal, I'd find it quite useful to limit the maximal width of bounding boxes (see image). Is there something like a
max_width
option or could I passrich.Console(width=200)
somewhere, like with theRichHandler
for logging? Ideally the bounding boxes would just automatically span the width of the widest line in them.Example Code
Details (click here)
Operating System
Linux
Operating System Details
No response
Typer Version
0.9.0
Python Version
3.10
First Check
Commit to Help
Beta Was this translation helpful? Give feedback.
All reactions