Skip to content

Commit bbb5829

Browse files
authored
Merge pull request sharkdp#3242 from simono/patch-1
Add abbreviations for fish to Readme
2 parents 5c43ddb + c00b382 commit bbb5829

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: README.md

+7
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,13 @@ alias -g -- -h='-h 2>&1 | bat --language=help --style=plain'
240240
alias -g -- --help='--help 2>&1 | bat --language=help --style=plain'
241241
```
242242

243+
For `fish`, you can use abbreviations:
244+
245+
```fish
246+
abbr -a --position anywhere -- --help '--help | bat -plhelp'
247+
abbr -a --position anywhere -- -h '-h | bat -plhelp'
248+
```
249+
243250
This way, you can keep on using `cp --help`, but get colorized help pages.
244251

245252
Be aware that in some cases, `-h` may not be a shorthand of `--help` (for example with `ls`).

0 commit comments

Comments
 (0)