mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-10-30 22:54:07 +00:00 
			
		
		
		
	docs: add global --help alias limitations
				
					
				
			This commit is contained in:
		| @@ -228,15 +228,17 @@ help() { | |||||||
|  |  | ||||||
| Then you can do `$ help cp` or `$ help git commit`. | Then you can do `$ help cp` or `$ help git commit`. | ||||||
|  |  | ||||||
| Alternatively, you can also use global aliases to override `-h` and `--help` entirely: | When you are using `zsh`, you can also use global aliases to override `-h` and `--help` entirely: | ||||||
|  |  | ||||||
| ```bash | ```bash | ||||||
| alias -g -- -h='-h | bat --language=help --style=plain' | alias -g -- -h='-h 2>&1 | bat --language=help --style=plain' | ||||||
| alias -g -- --help='--help | bat --language=help --style=plain' | alias -g -- --help='--help 2>&1 | bat --language=help --style=plain' | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| 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`). | ||||||
|  |  | ||||||
| Please report any issues with the help syntax in [this repository](https://github.com/victor-gp/cmd-help-sublime-syntax). | Please report any issues with the help syntax in [this repository](https://github.com/victor-gp/cmd-help-sublime-syntax). | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user