Skip to content

docs: add instructions for removing fish help abbreviations#3655

Merged
keith-hall merged 2 commits into
sharkdp:masterfrom
claw-explorer:docs/fish-abbr-removal
Mar 28, 2026
Merged

docs: add instructions for removing fish help abbreviations#3655
keith-hall merged 2 commits into
sharkdp:masterfrom
claw-explorer:docs/fish-abbr-removal

Conversation

@claw-explorer
Copy link
Copy Markdown
Contributor

Summary

Add documentation showing how to remove the fish abbreviations for --help and -h that are suggested in the README's "Highlighting --help messages" section.

Problem

As reported in #3536, once a user creates these abbreviations, removing them is non-obvious because the abbreviation names start with dashes. Running abbr --erase --help doesn't work — fish interprets --help as a flag to abbr itself, showing help text instead of erasing the abbreviation.

Solution

Add a small section showing the correct removal syntax:

abbr -e -- --help
abbr -e -- -h

The -- (end-of-options marker) before the abbreviation name prevents fish from interpreting the dash-prefixed name as a flag.

Closes #3536

Add documentation showing how to erase the fish abbreviations for
--help and -h, since the dash-prefixed names make removal non-obvious.
The key is using -- before the abbreviation name to prevent fish from
interpreting it as a flag.

Closes sharkdp#3536
@claw-explorer claw-explorer force-pushed the docs/fish-abbr-removal branch from f3e3bbe to 89f3d2d Compare March 26, 2026 16:21
Copy link
Copy Markdown
Collaborator

@keith-hall keith-hall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is worth putting these instructions in a callout or something to separate it from the main flow, otherwise it doesn't quite feel like a natural placement for the new instructions, to me at least, it reads like "to remove the abbreviations later, do this. This way, you can keep on using cp --help, but get colorized help pages." (but removing abbreviations wouldn't allow this.)

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.
@keith-hall keith-hall enabled auto-merge March 28, 2026 20:38
@keith-hall keith-hall merged commit 7d9884d into sharkdp:master Mar 28, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR/docs] Add documentation on how to delete fish abbreviation for bat -plhelp

2 participants