mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-11-04 00:51:56 +00:00 
			
		
		
		
	Update README.md to mention --strip-ansi
				
					
				
			This commit is contained in:
		@@ -759,9 +759,14 @@ bat() {
 | 
			
		||||
 | 
			
		||||
If an input file contains color codes or other ANSI escape sequences or control characters, `bat` will have problems
 | 
			
		||||
performing syntax highlighting and text wrapping, and thus the output can become garbled.
 | 
			
		||||
When displaying such files it is recommended to disable both syntax highlighting and wrapping by
 | 
			
		||||
 | 
			
		||||
If your version of `bat` supports the `--strip-ansi=auto` option, it can be used to remove such sequences
 | 
			
		||||
before syntax highlighting. Alternatively, you may disable both syntax highlighting and wrapping by
 | 
			
		||||
passing the `--color=never --wrap=never` options to `bat`.
 | 
			
		||||
 | 
			
		||||
> [!NOTE]
 | 
			
		||||
> The `auto` option of `--strip-ansi` avoids removing escape sequences when the syntax is plain text.
 | 
			
		||||
 | 
			
		||||
### Terminals & colors
 | 
			
		||||
 | 
			
		||||
`bat` handles terminals *with* and *without* truecolor support. However, the colors in most syntax
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user