From ed99a3a10481af490f416c3efc259e4ddb18df5c Mon Sep 17 00:00:00 2001 From: pseudometa <73286100+chrisgrieser@users.noreply.github.com> Date: Mon, 10 Jul 2023 16:37:44 +0200 Subject: [PATCH] docs: Add better snippet for colorizing help pages --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 4f0849cb..d5116fd2 100644 --- a/README.md +++ b/README.md @@ -228,6 +228,15 @@ help() { Then you can do `$ help cp` or `$ help git commit`. +Alternatively, you can also use global aliases to override `-h` and `--help` entirely: + +```bash +alias -g -- -h='-h | bat --language=help --style=plain' +alias -g -- --help='--help | bat --language=help --style=plain' +``` + +This way, you can keep on using `cp --help`, but get colorized help pages. + Please report any issues with the help syntax in [this repository](https://github.com/victor-gp/cmd-help-sublime-syntax).