You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to dynamically truncate the output of a module to the width of the terminal? I'd like to truncate it to 1 less then the final column of the terminal. I did see that there is functionality to truncate using "format": "{:-50}" and all the different variations of that format notation. But that just leaves a bunch of extra space in a wide terminal and truncates at the specified length.
My reason for asking is that I've configured a dynamic width for output that is fully boxed in. Here's a small section as example:
When I shrink the terminal everything is fine (no line wrap), the output is truncated at the last column, but it prevents the final "|" from printing. Like:
If anyone has thoughts on how, or some other method I'm missing that could be used, I'd love to hear it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is there a way to dynamically truncate the output of a module to the width of the terminal? I'd like to truncate it to 1 less then the final column of the terminal. I did see that there is functionality to truncate using "format": "{:-50}" and all the different variations of that format notation. But that just leaves a bunch of extra space in a wide terminal and truncates at the specified length.
My reason for asking is that I've configured a dynamic width for output that is fully boxed in. Here's a small section as example:

When I shrink the terminal everything is fine (no line wrap), the output is truncated at the last column, but it prevents the final "|" from printing. Like:

If anyone has thoughts on how, or some other method I'm missing that could be used, I'd love to hear it.
Beta Was this translation helpful? Give feedback.
All reactions