Nepeta mode: purrfect cat-speak reskin (closes #17) - #24
Merged
Conversation
- New include/nepeta.h and src/nepeta.c: opt-in cat-speak reskin of
prompt, banner, help text, and builtin error/status messages
- Nepeta mode is toggleable via TRIGGER_NEPETA env var ('1'/'yes'/etc
enables) or the new 'nepeta' builtin (on/off/status/bare)
- Whole-word alpha-run pun translation: for→fur, perfect→purrfect,
great→clawesome, awesome→pawsome, friend→furriend, now→meow, help→halp
- When disabled, trigger_nepeta_say delegates to fputs — all existing
output is byte-identical; no pipelines, external programs, perror(),
or builtin name listings are affected
- Tests: 18 new NepetaTests (state, prompt, translate, say capture,
env init) + 6 new builtin dispatch tests (count bumped to 8)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces an opt-in “Nepeta mode” easter egg that reskins Trigger’s own generated output (prompt/banner/help and selected builtin messages) using a cat-speak/pun translation layer, while keeping normal behavior unchanged when disabled.
Changes:
- Added a new Nepeta module (
nepeta.h/nepeta.c) implementing enable/disable state, prompt/banner output, and word-level translation. - Added a new
nepetabuiltin and routed some builtin output through the Nepeta “say” helper. - Added a dedicated Nepeta test suite and extended builtin tests; integrated the new module and tests into CMake/CTest.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_nepeta.c |
New module-level tests for Nepeta enable state, prompt, translation, say, quotes, and env init. |
tests/test_builtins.c |
Adds coverage for the new nepeta builtin and updates builtin count/lookup assertions. |
src/nepeta.c |
Implements Nepeta state, translation engine, prompt/banner, and random quotes. |
src/main.c |
Initializes Nepeta from env and switches prompt rendering to Nepeta-aware prompt helper. |
src/builtins.c |
Registers nepeta builtin and routes selected builtin output through Nepeta-aware output. |
include/nepeta.h |
New public header for Nepeta APIs. |
include/builtins.h |
Declares the new trigger_nepeta builtin function. |
CMakeLists.txt |
Adds src/nepeta.c / include/nepeta.h and introduces test_nepeta in the test target list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
This PR adds an opt-in Nepeta mode — a lighthearted easter egg that reskins trigger's own generated output with Nepeta Leijon's cat-speak quirk from Homestuck. When enabled, the shell prefix message, prompt, help text, and certain builtin error/status messages get cat-faced and pun-translated.
Toggle via env var or builtin:
Scope boundary
Only trigger's own output is affected:
>to:33 <perror()/strerror(), and builtin name listings are never touchedWhen Nepeta mode is disabled (the default), all output is byte-identical to the previous behavior.
Pun dictionary
Whole-word alpha-run matching with case preservation on first letter:
for→fur,perfect→purrfect,great→clawesome,awesome→pawsome,friend→furriend,now→meow,help→halpFiles changed
include/nepeta.h(new)src/nepeta.c(new)include/builtins.htrigger_nepetasrc/builtins.cnepetabuiltin, route cd/help/exit messages throughtrigger_nepeta_saysrc/main.ctrigger_nepeta_prompt(), call init_from_env + print_banner at startupCMakeLists.txttest_nepetatargettests/test_nepeta.c(new)tests/test_builtins.cCloses #17