feat(gi): bundled boilerplate fallback + -c/--custom template flag #179
Merged
rootiest
merged 1 commits from 2026-09-24 04:54:42 +00:00
feat/gi-boilerplate-fallback-and-custom into main
No Reviewers
Labels
Clear labels
Area/CI
Area/Completions
Area/Components
Area/Config
Area/Docs
Area/Functions
Area/Integrations
Area/Prompt & Theme
Area/Scripts
Area/Tests
Compat/Breaking
Kind/Bug
Kind/Chore
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Refactor
Kind/Security
Kind/Testing
good first issue
help wanted
.github/workflows and repository automation
completions/ - tab-completion scripts
The opinionated-component system (C1-C6)
config.fish and conf.d/ - startup and environment
docs/manual/ and the generated manual, man page, and site
functions/ - user-facing functions and helpers
integrations/ - third-party tool wiring
themes/ and prompt appearance
scripts/ - standalone helper scripts
tests/ - the syntax lint and functional suite
Breaking change that won't be backward compatible
Something is not working
Tooling, dependencies, and housekeeping
Documentation changes
Improve existing functionality
New functionality
Makes existing behavior faster or lighter
Restructures code without changing behavior
This is security issue
Issue or pull request related to testing
Well-scoped and self-contained; a good place to start
Maintainer is looking for someone to pick this up
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Milestone
No items
No Milestone
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: rootiest/fish-config#179
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Stacked on #178 (uses its
-s/-o/-fflag names).Problem
gi -b/default boilerplate mode hard-errored when$GITIGNORE_BOILERPLATEwas unset, so it only worked for users who'd already configured a personal template (typically via.user-dots). No way to point at an ad-hoc template without exporting the env var either.Fix
Boilerplate source resolves in priority order:
-c/--custom PATH— new flag, explicit override$GITIGNORE_BOILERPLATE— existing behavior, unchangeddata/gi/boilerplate.gitignore— new fallback, no error-cimplies boilerplate mode (like-b), sogi -c template.gitignoreworks standalone without also passing-b.The bundled template is a generalized copy of a personal one: OS junk (
.DS_Store,Thumbs.db,*~,.Trash-*,.nfs*), scratch/debug/temp directory patterns, and AI-tool session state (.claude*,.gemini*,.antigravity*,.agy*,.agents*,.remember*). It deliberately does not ignoreCLAUDE.md/AGENTS.md/GEMINI.md/ANTIGRAVITY.mdthemselves — committing those is increasingly normal practice, andagents-initalready owns their placement, so a boilerplate default shouldn't block it.Also fixed
A latent bug in
gi's trailingtest $needs_git -eq 1; and gitignore-scrubline: it leaked its own boolean as the function's exit status wheneverneeds_gitwas 0 (i.e. any--stdoutrun), so e.g.gi -o pythonreturned 1 on success. Same line this change already had to touch; fixed with an explicitif/return 0.Deferred (separate future job, not in this PR)
Whole-config onboarding pulling a
.user-dotstemplate repo when the user has none yet — noted for later, not implemented here. This PR only coversgi's own fallback.Testing
fish -n functions/gi.fish— syntax OKfish tests/test-network-fish.fish— 73/73 passed (new tests: fallback-with-unset-env,-cprecedence over env var,-cwith missing file,-osuccess exit-status regression)fish tests/run-tests.fish— 794/794 assertions, indent lint clean, exit 0docs/fish-config.mdupdated by hand to match (CI regen owns it long-term)