-
DescriptionWhen 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 Example Code#!/usr/bin/env python
import logging, typer
from rich.logging import RichHandler, Console
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()Details (click here)Operating SystemLinux Operating System DetailsNo response Typer Version0.9.0 Python Version3.10 First Check
Commit to Help
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
|
Beta Was this translation helpful? Give feedback.
-
|
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.
-
|
Closing this as duplicate of #607 |
Beta Was this translation helpful? Give feedback.
-
|
cf #528 (comment): you can set a |
Beta Was this translation helpful? Give feedback.


cf #528 (comment): you can set a
TERMINAL_WIDTHenv. var.