feat(shell): open project_open across all of ~/Code#208
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Generalizes project_open/po from a fixed ~/Code/wordpress base to discovering and opening projects anywhere under ~/Code, backed by an on-disk cache so completion stays fast.
Changes:
- Add recursive project discovery (
.git,bedrock,site) and name resolution with a cached index under$XDG_CACHE_HOME. - Update
project_opento resolve by basename and preserve existing WordPress-specific descent behavior. - Add a standalone bash test script covering scan/cache/resolve/completion helpers and
project_openruntime behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
shell/aliases |
Adds project discovery + cache helpers, switches project_open to resolve projects across ~/Code, and triggers async cache rebuild on shell startup. |
tests/project_open_test.sh |
New standalone fixture-based tests for discovery, cache TTL behavior, resolution, completion helper output, and project_open navigation. |
docs/superpowers/specs/2026-06-23-project-open-code-wide-design.md |
Design spec describing discovery markers, caching strategy, and completion behavior. |
docs/superpowers/plans/2026-06-23-project-open-code-wide.md |
Implementation plan documenting step-by-step changes and testing strategy. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8d9aa90 to
97ccd25
Compare
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.
Stacked on #204 (base is
po-autocomplete; will auto-retarget tomasteronce #204 merges).What
Generalises
project_open/poand their bash/zsh completion from the single~/Code/wordpressbase to any project discovered anywhere under~/Code.project_open HoldFastnow opens~/Code/mods/HoldFast..git,bedrock, orsite; the walk stops there, so vendored submodules (lib/vcpkg, ...) are excluded.bedrock/sitedescent, thethemetarget, and<subdir>second-arg navigation, all gated on markers.$XDG_CACHE_HOME/project_open/projects) rebuilt asynchronously at shell startup, so tab-completion never walks the tree.po_refreshforces a rebuild.Notes
<()process substitution: under zsh, a<()that calls a function nested inside$(...)empties$PATH, which brokecat/findin completion. Cache reads use shell builtins / here-strings; scans use pipes.~/Code, confirmed); no per-TAB freshness check; no new external dependency.Testing
tests/project_open_test.sh: 18 assertions (scan, cache + TTL guard, resolve, completion helpers, WordPress descent) pass under bash.$PATHintact).shellcheck shell/aliasesandzsh -n shell/aliasesclean.Design spec and implementation plan included under
docs/superpowers/.