feat(gi): merge gitig into gi with prompt, dedup, and boilerplate support #19
Reference in New Issue
Block a user
Delete Branch "feat/git-ignorer"
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
gitig.fishintogi.fish— single unified function for all.gitignoremanagement-b/--boilerplateflag (runs boilerplate append, the oldgitigbehavior); this is also the default when called with no arguments-p/--promptflag to interactively prompt for comma-separated API patternsgiwith no args) runs both boilerplate and prompt in sequence-s/--stdoutflag to print API output to stdout instead of appending (oldgibehavior)# id: gi-patterns-<hash>), so re-running with overlapping sets skips already-present patternsstring collectused on all curl captures to preserve multi-line output correctly in Fishor return 0+string trimguard onreadto handle empty Enter and Ctrl+D cleanlygitigandgit-ignoreabbreviations pointing togigitig.fishManual Verification
gi -hdisplays colored help with all flags listedgi(no args, inside a git repo) appends boilerplate then prompts for patternsgi vim,pythonappends two separate deduplicated blocks to.gitignoregi vim,rustafter the above skipsvim(notice) and appendsrustgi -bappends boilerplate only; re-running shows the "already present" noticegi -pprompts only, no boilerplategi -b -pruns boilerplate then promptgi -s python,vimprints combined output to stdout, no file writtengi -llists all API targetsgioutside a git repo shows a clear errorgitigandgit-ignoreabbreviations expand togi