Skip to content

Commit 6d5d75a

Browse files
docs: clarify uninstall run-order + statusLine ceiling (#278)
Follow-up to #228 (issue #226): - README: state that scripts/uninstall.js must run *before* the host remove command, since the script is itself a plugin file and gets deleted by the removal (or run it from a separate clone). - uninstall.js: add a ponytail: comment naming the statusLine match ceiling — substring match + whole-key delete removes a combined (e.g. caveman+ponytail) statusline wholesale; upgrade path noted. - Add trailing newline to the file. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent ae24cd0 commit 6d5d75a

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ Which files map to which agent: [Agent portability](docs/agent-portability.md).
219219
| Pi agent | `pi uninstall ponytail` |
220220
| Cursor / Windsurf / Cline / etc. | Delete the copied rule file |
221221

222-
These remove the plugin's own files. They leave behind a small amount of state ponytail writes outside the plugin folder: the mode flag, `~/.config/ponytail/config.json`, and (if you accepted the setup nudge) a `statusLine` entry in `~/.claude/settings.json`. Run `node scripts/uninstall.js` (from this repo, or wherever it was installed) to clean those up too. It only removes the statusLine entry if it points at ponytail's own script, so a statusline you set up yourself is left untouched.
222+
These remove the plugin's own files. They leave behind a small amount of state ponytail writes outside the plugin folder: the mode flag, `~/.config/ponytail/config.json`, and (if you accepted the setup nudge) a `statusLine` entry in `~/.claude/settings.json`. Run `node scripts/uninstall.js` to clean those up too. **Run it before the host remove command above** — the script is itself a plugin file, so removing the plugin first deletes it (or run it from a separate clone of this repo). It only removes the statusLine entry if it points at ponytail's own script, so a statusline you set up yourself is left untouched.
223223

224224
## Commands
225225

‎scripts/uninstall.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,15 @@ try {
2626
const raw = fs.readFileSync(settingsPath, 'utf8').replace(/^\uFEFF/, '');
2727
const settings = JSON.parse(raw);
2828
const cmd = settings.statusLine && settings.statusLine.command;
29+
// ponytail: substring-match the script name, then drop the whole statusLine
30+
// key. A combined statusline (e.g. caveman+ponytail) whose command contains
31+
// "ponytail-statusline" gets removed wholesale. Parse out only ponytail's part
32+
// if combined statuslines become common.
2933
if (typeof cmd === 'string' && cmd.includes('ponytail-statusline')) {
3034
delete settings.statusLine;
3135
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2), 'utf8');
3236
console.log(`Removed ponytail statusLine entry from ${settingsPath}`);
3337
}
3438
} catch (e) {
3539
if (e.code !== 'ENOENT') throw e;
36-
}
40+
}

0 commit comments

Comments
 (0)