ohmyzsh/plugins/gitignore
Rishvic Pushpakaran aac5face5f
feat(gitignore): add caching to gi completion
Adds a cache policy for the `gi` command completion function, i.e.
`_gitignoreio`. Previously, every completion call would request the list
endpoint of gitignore.io over the network, resulting in a delay between
pressing <Tab> and the autocomplete options showing up.

Since we don't expect the gitignore.io templates to change that
frequently, configured the cache policy to expire after 7 days.

Fixes #13736

Signed-off-by: Rishvic Pushpakaran <rishvic@gmail.com>
2026-05-10 03:42:05 +05:30
..
gitignore.plugin.zsh feat(gitignore): add caching to gi completion 2026-05-10 03:42:05 +05:30
README.md feat(gitignore): use cdn as endpoint (#13497) 2026-01-20 10:21:56 +01:00

gitignore

This plugin enables you to use gitignore.io from the command line. You need an active internet connection to fetch templates. The plugin uses the gitignore.io CDN endpoint to simplify access and improve reliability.

To use it, add gitignore to the plugins array in your zshrc file:

plugins=(... gitignore)

Plugin commands

  • gi list: List all the currently supported gitignore.io templates.

  • gi [TEMPLATENAME]: Show git-ignore output on the command line, e.g. gi java to exclude class and package files.

  • gi [TEMPLATENAME] >> .gitignore: Append the template rules to your project's .gitignore file.