mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-10-31 15:12:12 +00:00 
			
		
		
		
	PAGER: Wrapper script is not needed anymore
This commit is contained in:
		
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
									
									
									
									
								
							| @@ -292,16 +292,12 @@ set, `less` is used by default. If you want to use a different pager, you can ei | |||||||
| `PAGER` variable or set the `BAT_PAGER` environment variable to override what is specified in | `PAGER` variable or set the `BAT_PAGER` environment variable to override what is specified in | ||||||
| `PAGER`. | `PAGER`. | ||||||
|  |  | ||||||
| If you want to pass command-line arguments to the pager, you need to create a small shell | If you want to pass command-line arguments to the pager, you can also set them via the | ||||||
| script as a wrapper, for example | `PAGER`/`BAT_PAGER` variables: | ||||||
|  |  | ||||||
| ```bash | ```bash | ||||||
| #!/bin/bash | export BAT_PAGER="less -RF" | ||||||
|  |  | ||||||
| less --tabs 4 -R "$@" |  | ||||||
| ``` | ``` | ||||||
| (put this in a file `~/.bat-pager.sh`, make it executable `chmod +x ~/.bat-pager.sh` and use |  | ||||||
| `export BAT_PAGER="$HOME/.bat-pager.sh"` in your shells `rc` file) |  | ||||||
|  |  | ||||||
| **Note**: By default, if the pager is set to `less`, `bat` will pass the following command line | **Note**: By default, if the pager is set to `less`, `bat` will pass the following command line | ||||||
| options to the pager: `-R`/`--RAW-CONTROL-CHARS`, `-F`/`--quit-if-one-screen` and `-X`/`--no-init`. | options to the pager: `-R`/`--RAW-CONTROL-CHARS`, `-F`/`--quit-if-one-screen` and `-X`/`--no-init`. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user