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
The description on --style is misleading. It says "auto: same as 'full', unless the output is piped." and "full: enables all available components (default)".
This is misleading - I read it as saying that when --style=full is passed, the full decorations are enabled in a command like this: echo '' | bat --style=full | cat. This is not the case - this pipeline prints a newline rather than something like "STDIN\n 1 ". Compare the output with echo '' | bat --style=full. If the output is piped, loop_through is enabled, the SimplePrinter is selected, and the output is printed without any decorations regardless of the --style=full flag. This effectively throws away the style configuration whenever cat-compatibility mode is enabled, which is not what the documentation says.
As a secondary question, what is the point of the --style=auto option if the style is ignored when the output is piped? It provides the same functionality as --style=full --decorations=auto. It seems like having both is redundant.
The text was updated successfully, but these errors were encountered:
The description on --style is misleading. It says "auto: same as 'full', unless the output is piped." and "full: enables all available components (default)".
This is misleading - I read it as saying that when --style=full is passed, the full decorations are enabled in a command like this:
echo '' | bat --style=full | cat
. This is not the case - this pipeline prints a newline rather than something like "STDIN\n 1 ". Compare the output withecho '' | bat --style=full
. If the output is piped, loop_through is enabled, the SimplePrinter is selected, and the output is printed without any decorations regardless of the--style=full
flag. This effectively throws away the style configuration whenever cat-compatibility mode is enabled, which is not what the documentation says.As a secondary question, what is the point of the
--style=auto
option if the style is ignored when the output is piped? It provides the same functionality as--style=full --decorations=auto
. It seems like having both is redundant.The text was updated successfully, but these errors were encountered: