auto-discover org containers in code() launcher #13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "code-fn-auto-discover-org-containers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
code <name>failed to find projects in new~/code/*/org-style containers because the function hardcoded onlyHHS/anddepartment-of-veterans-affairs/as fallback search paths. The VA dir no longer exists, and newer containers (common-grants/,games/) weren't reachable.Replaces the hardcoded fallback with auto-discovery: after checking
~/code/$1, scan~/code/*/for any directory matching$1. Containers that are themselves git repos are skipped so a top-level project with a same-named subdir isn't mistaken for a container. Ambiguous matches produce a warning + suggestion to use the explicitcontainer/projectform (which already resolves via the direct path).Changes
dot-config/zsh/functions.zsh— replace fixedHHS/department-of-veterans-affairsfallback with~/code/*/scan; add ambiguity warning.Newly reachable projects
burnt-ice,playable-workshop-learning-demo(undergames/)py-cg-grants-gov,ts-cg-grants-gov(undercommon-grants/)~/code/<org>/<project>dir — no edit needed.Test plan
Verified in a stubbed zsh session (session-script replaced with an echo):
code dotfiles→~/code/dotfilescode burnt-ice→~/code/games/burnt-icecode py-cg-grants-gov→~/code/common-grants/py-cg-grants-govcode simpler-grants-protocol→~/code/HHS/simpler-grants-protocolcode HHS/simpler-grants-protocol→ sameNotes
department-of-veterans-affairsreference from the error message too../ no-arg behavior.auto-discover org containers in code() launcherto WIP: auto-discover org containers in code() launcherWIP: auto-discover org containers in code() launcherto auto-discover org containers in code() launcher