feat(scripts): personal opt-out via --skip and private profiles dir#4
feat(scripts): personal opt-out via --skip and private profiles dir#4RevealUIStudio merged 1 commit intomainfrom
Conversation
Add two additive opt-outs to link.sh, unlink.sh, and status.sh so an
operator can separate their proprietary workflow from the agnostic
editor configs that ship to users:
--skip <editor> skip a specific editor (repeatable)
REVCON_SKIP_EDITORS=... comma-separated default skip list
REVCON_PRIVATE_PROFILES_DIR additional search location for
--profile <name>; private profiles
take precedence over in-repo ones.
Defaults are unchanged. The product still ships configs for every
supported editor; this just lets an individual operator opt out of
editors they don't use and layer in private profiles that never
enter the public repo.
unlink.sh strips symlinks pointing into the private dir as well
(otherwise it would orphan them). status.sh tags private-profile
sources as private:<rel-path> and marks profile names with
"(private)" in human + JSON output.
link.sh splits its profile-listing into a print_profiles helper
plus the --list entry point so error paths can list profiles and
still exit 1.
README documents both mechanisms under a new "Personal Opt-Out"
section.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 422495457a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| is_revcon_link() { | ||
| local dest="$1" | ||
| [[ "$dest" == "$SCRIPT_DIR"* ]] && return 0 | ||
| [[ -n "$PRIVATE_PROFILES_DIR" && "$dest" == "$PRIVATE_PROFILES_DIR"* ]] && return 0 |
There was a problem hiding this comment.
Match private-dir links with a path boundary
The private-profile check treats any path that merely shares the same prefix as managed ([[ "$dest" == "$PRIVATE_PROFILES_DIR"* ]]), so with REVCON_PRIVATE_PROFILES_DIR=/home/me/private a symlink to /home/me/private-backups/... is incorrectly considered revcon-owned. In unlink.sh this can delete unrelated symlinks from a project, and the same matcher in status.sh will misreport unrelated links as revcon-managed. Restrict matching to the directory boundary (for example "$PRIVATE_PROFILES_DIR/"*, optionally plus exact-dir handling) to avoid false positives.
Useful? React with 👍 / 👎.
Summary
Two additive opt-outs in revcon's scripts that let an operator separate their proprietary workflow from the agnostic editor configs that ship to users. Defaults are unchanged — every supported editor still links by default.
--skip <editor>flag +REVCON_SKIP_EDITORSenv var inlink.sh,unlink.sh, andstatus.sh. Per-invocation flag is repeatable; env var takes a comma-separated list.REVCON_PRIVATE_PROFILES_DIRenv var points at an external directory.--profile <name>resolves there first and falls back to in-repoprofiles/<name>/.--listshows both with(private)markers.unlink.shknows to remove symlinks pointing into the private dir (otherwise they'd orphan).status.shtags private sources asprivate:<rel-path>.Test plan
bash -nsyntax-clean acrosslink.sh/unlink.sh/status.sh./link.sh --helpshows new flags + env-var section./link.sh --listbaseline (in-repo profiles only)REVCON_PRIVATE_PROFILES_DIR=… ./link.sh --listshows in-repo + private with(private)markers./link.sh --dry-run --target X --profile revealuistill links all 5 editors--skip cursor --skip agents --skip vscodecorrectly skips named editorsREVCON_SKIP_EDITORS=cursor,vscodeenv var works the same way--profile joshuaresolves to the private dir when env var is setfind -type lconfirms targetsstatus.shreports(profile: joshua (private))andprivate:joshua/zed/settings.jsonsourceunlink.shremoves the private symlinks too (the key fix — would orphan otherwise)--profile does-not-existprints error + profile listing and exits 1 (verified viabash -xtrace)