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
Have you checked the issues for a similar suggestions?
Yes
How would you improve Rich?
In the cases that tabs are desired to be preserved.
Give as much detail as you can. Example code of how you would like it to work would help.
fromrich.consoleimportConsoleConsole.print('a\tb')
# prints 'a{tab}b', instead of 'a b'
What problem does it solved for you?
The case I encountered is that \t is used as a delimiter in -a value fish shell's complete command to separate a completion name and description. I want to use rich to print all possible combinations of completion names and descriptions like such:
install\tInstall a package
list\tList all installed packages
show\tShow info of given package
However, rich prints it with the tabs being replaced with spaces, which make complete command not recognize the descriptions.
What problem do you have that this feature would solve? I may be able to suggest an existing way of solving it.
Maybe set tab_size to 0 to preserve tabs?
The text was updated successfully, but these errors were encountered:
Do you need to use Rich for this case? Much of what Rich does re formatting and styling makes the output good for humans, but hard to consume by other programs.
You could write to the stream directly, and bypass Rich's processing with the following:
But would writing to the file directly (with console.file.write) address your needs? Preserving tabs would pretty much break most of Rich's formatting.
Have you checked the issues for a similar suggestions?
Yes
How would you improve Rich?
In the cases that tabs are desired to be preserved.
Give as much detail as you can. Example code of how you would like it to work would help.
What problem does it solved for you?
The case I encountered is that
\t
is used as a delimiter in-a
value fish shell's complete command to separate a completion name and description. I want to use rich to print all possible combinations of completion names and descriptions like such:However, rich prints it with the tabs being replaced with spaces, which make complete command not recognize the descriptions.
What problem do you have that this feature would solve? I may be able to suggest an existing way of solving it.
Maybe set
tab_size
to0
to preserve tabs?The text was updated successfully, but these errors were encountered: