feat(gi): merge gitig into gi with prompt, dedup, and boilerplate support #19

Merged
rootiest merged 4 commits from feat/git-ignorer into main 2026-05-23 03:50:07 +00:00
Owner

Summary

  • Merges gitig.fish into gi.fish — single unified function for all .gitignore management
  • Adds -b/--boilerplate flag (runs boilerplate append, the old gitig behavior); this is also the default when called with no arguments
  • Adds -p/--prompt flag to interactively prompt for comma-separated API patterns
  • Default (gi with no args) runs both boilerplate and prompt in sequence
  • Adds -s/--stdout flag to print API output to stdout instead of appending (old gi behavior)
  • Each pattern in a comma-separated list is fetched and deduplicated individually via MD5 hash signature (# id: gi-patterns-<hash>), so re-running with overlapping sets skips already-present patterns
  • string collect used on all curl captures to preserve multi-line output correctly in Fish
  • or return 0 + string trim guard on read to handle empty Enter and Ctrl+D cleanly
  • Adds gitig and git-ignore abbreviations pointing to gi
  • Deletes gitig.fish
  • Colored help output

Manual Verification

  • gi -h displays colored help with all flags listed
  • gi (no args, inside a git repo) appends boilerplate then prompts for patterns
  • Pressing Enter at the pattern prompt exits cleanly with no error
  • gi vim,python appends two separate deduplicated blocks to .gitignore
  • Running gi vim,rust after the above skips vim (notice) and appends rust
  • gi -b appends boilerplate only; re-running shows the "already present" notice
  • gi -p prompts only, no boilerplate
  • gi -b -p runs boilerplate then prompt
  • gi -s python,vim prints combined output to stdout, no file written
  • gi -l lists all API targets
  • gi outside a git repo shows a clear error
  • gitig and git-ignore abbreviations expand to gi
## Summary - Merges `gitig.fish` into `gi.fish` — single unified function for all `.gitignore` management - Adds `-b/--boilerplate` flag (runs boilerplate append, the old `gitig` behavior); this is also the default when called with no arguments - Adds `-p/--prompt` flag to interactively prompt for comma-separated API patterns - Default (`gi` with no args) runs both boilerplate and prompt in sequence - Adds `-s/--stdout` flag to print API output to stdout instead of appending (old `gi` behavior) - Each pattern in a comma-separated list is fetched and deduplicated individually via MD5 hash signature (`# id: gi-patterns-<hash>`), so re-running with overlapping sets skips already-present patterns - `string collect` used on all curl captures to preserve multi-line output correctly in Fish - `or return 0` + `string trim` guard on `read` to handle empty Enter and Ctrl+D cleanly - Adds `gitig` and `git-ignore` abbreviations pointing to `gi` - Deletes `gitig.fish` - Colored help output ## Manual Verification - [x] `gi -h` displays colored help with all flags listed - [x] `gi` (no args, inside a git repo) appends boilerplate then prompts for patterns - [x] Pressing Enter at the pattern prompt exits cleanly with no error - [x] `gi vim,python` appends two separate deduplicated blocks to `.gitignore` - [x] Running `gi vim,rust` after the above skips `vim` (notice) and appends `rust` - [x] `gi -b` appends boilerplate only; re-running shows the "already present" notice - [x] `gi -p` prompts only, no boilerplate - [x] `gi -b -p` runs boilerplate then prompt - [x] `gi -s python,vim` prints combined output to stdout, no file written - [x] `gi -l` lists all API targets - [x] `gi` outside a git repo shows a clear error - [x] `gitig` and `git-ignore` abbreviations expand to `gi`
rootiest added 3 commits 2026-05-23 03:46:01 +00:00
rootiest added 1 commit 2026-05-23 03:48:30 +00:00
- Remove magic-enter.fish from plugins table (plugin removed)
- Add gi function to Git functions table with all flags documented
- Add gitig/git-ignore abbreviations to Git abbreviations table
- Add GITIGNORE_BOILERPLATE env var example to local.fish personalization block
rootiest merged commit 08ae7cbd5e into main 2026-05-23 03:50:07 +00:00
rootiest deleted branch feat/git-ignorer 2026-05-23 03:50:08 +00:00
Sign in to join this conversation.