mirror of
https://github.com/sharkdp/bat
synced 2026-06-09 10:03:18 +00:00
docs: move removal instructions into a TIP callout
Address review feedback from @keith-hall: wrap the abbreviation removal instructions in a GitHub callout (> [!TIP]) to visually separate them from the main setup flow. Also reorder so the 'This way, you can keep on using...' sentence follows directly after the abbreviation creation, improving readability.
This commit is contained in:
@@ -244,17 +244,16 @@ abbr -a --position anywhere -- --help '--help | bat -plhelp'
|
||||
abbr -a --position anywhere -- -h '-h | bat -plhelp'
|
||||
```
|
||||
|
||||
To remove these abbreviations later:
|
||||
|
||||
```fish
|
||||
abbr -e -- --help
|
||||
abbr -e -- -h
|
||||
```
|
||||
|
||||
The `--` before the abbreviation name is required because `--help` and `-h` start with dashes, which would otherwise be interpreted as flags to `abbr` itself.
|
||||
|
||||
This way, you can keep on using `cp --help`, but get colorized help pages.
|
||||
|
||||
> [!TIP]
|
||||
> To remove these abbreviations later, run:
|
||||
> ```fish
|
||||
> abbr -e -- --help
|
||||
> abbr -e -- -h
|
||||
> ```
|
||||
> The `--` before the abbreviation name is required because `--help` and `-h` start with dashes, which would otherwise be interpreted as flags to `abbr` itself.
|
||||
|
||||
Be aware that in some cases, `-h` may not be a shorthand of `--help` (for example with `ls`). In cases where you need to use `-h`
|
||||
as a command argument you can prepend `\` to the argument (eg. `ls \-h`) to escape the aliasing defined above.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user