summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpseudometa <73286100+chrisgrieser@users.noreply.github.com>2023-09-02 09:52:40 +0200
committerDavid Peter <sharkdp@users.noreply.github.com>2023-09-02 14:54:55 +0200
commit9b73eda9576a846dc6c5e6c0ac14ed38e7b5b5ce (patch)
treec95f5318136e9971d1452dfb0cb1e29675a0f0d1
parented99a3a10481af490f416c3efc259e4ddb18df5c (diff)
docs: add global `--help` alias limitations
-rw-r--r--README.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/README.md b/README.md
index d5116fd2..bb150097 100644
--- a/README.md
+++ b/README.md
@@ -228,15 +228,17 @@ help() {
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
-alias -g -- -h='-h | bat --language=help --style=plain'
-alias -g -- --help='--help | bat --language=help --style=plain'
+alias -g -- -h='-h 2>&1 | 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.
+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).