sharkdp / bat

A cat(1) clone with wings.
Apache License 2.0
48.97k stars 1.23k forks source link

Adding line number printing when output is piped out #2983

Open domenicomastrangelo opened 4 months ago

domenicomastrangelo commented 4 months ago

Updating ~print_line function in~ SimplePrinter to use line numbers when printing a line if line numbers are desired (self.config.style_components.numbers() / StyleComponent::LineNumbers).

This was a compatibility issue with cat until now as describe in issue #2935.

~Updating of some integration tests was necessary as now we expect the output to contain line numbers.~