Skip to content

Use batcat for the cat alias on Debian/Ubuntu#24

Merged
RWejlgaard merged 1 commit into
masterfrom
fix/bat-batcat-alias
Jun 19, 2026
Merged

Use batcat for the cat alias on Debian/Ubuntu#24
RWejlgaard merged 1 commit into
masterfrom
fix/bat-batcat-alias

Conversation

@RWejlgaard

Copy link
Copy Markdown
Owner

Debian and Ubuntu install bat's binary as batcat to avoid a name clash with another package, so alias cat="bat -Pp" pointed at a binary that doesn't exist on those distros.

The alias now detects whichever name is present (bat everywhere else, batcat on Debian/Ubuntu).

Validation

Confirmed against a clean ubuntu:24.04 container — the bat package installs /usr/bin/batcat with no bat on PATH:

bat:    MISSING
batcat: /usr/bin/batcat

fish --no-execute passes, and on a host where bat is present the alias still resolves to bat -Pp.

Debian and Ubuntu install bat's binary as `batcat` to avoid a name
clash, so `alias cat="bat -Pp"` pointed at a binary that doesn't exist
there. Detect whichever name is present.
@RWejlgaard RWejlgaard merged commit b3c21be into master Jun 19, 2026
5 checks passed
@RWejlgaard RWejlgaard deleted the fix/bat-batcat-alias branch June 19, 2026 19:02
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.

1 participant