mirror of
https://github.com/sharkdp/bat.git
synced 2025-04-05 18:30:34 +01:00
Add abbreviations for fish to Readme
This commit is contained in:
parent
5c43ddb56c
commit
c00b382f13
@ -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'
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
Be aware that in some cases, `-h` may not be a shorthand of `--help` (for example with `ls`).
|
||||
|
Loading…
x
Reference in New Issue
Block a user