mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-11-04 00:51:56 +00:00 
			
		
		
		
	Merge pull request #3242 from simono/patch-1
Add abbreviations for fish to Readme
This commit is contained in:
		@@ -240,6 +240,13 @@ alias -g -- -h='-h 2>&1 | bat --language=help --style=plain'
 | 
				
			|||||||
alias -g -- --help='--help 2>&1 | bat --language=help --style=plain'
 | 
					alias -g -- --help='--help 2>&1 | bat --language=help --style=plain'
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For `fish`, you can use abbreviations:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```fish
 | 
				
			||||||
 | 
					abbr -a --position anywhere -- --help '--help | bat -plhelp'
 | 
				
			||||||
 | 
					abbr -a --position anywhere -- -h '-h | bat -plhelp'
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This way, you can keep on using `cp --help`, but get colorized help pages.
 | 
					This way, you can keep on using `cp --help`, but get colorized help pages.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Be aware that in some cases, `-h` may not be a shorthand of `--help` (for example with `ls`).
 | 
					Be aware that in some cases, `-h` may not be a shorthand of `--help` (for example with `ls`).
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user