Skip to content
ZSH plugin for creating .gitignore files.
Shell
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
templates @ 0d7600f =^_^= Update templates Sep 16, 2019
test_fixtures Add more tests Aug 18, 2017
tests Test function listing templates Aug 18, 2017
tools Fix Aug 22, 2017
.gitmodules Add all necessary files. Jan 16, 2014
.travis.yml Update zunit version Aug 4, 2018
LICENSE Initial commit Jan 16, 2014
README.md Improve README Aug 4, 2018
gitignore.plugin.zsh Standarized $0 handling, editing of .gitignore finds root of repository Oct 28, 2018

README.md

gitignore.plugin.zsh Build Status

Zsh plugin for creating .gitignore files.

Installation

Antigen:

    antigen bundle voronkovich/gitignore.plugin.zsh

Zplug:

    zplug voronkovich/gitignore.plugin.zsh

Or clone this repo and add this into your .zshrc:

    source path/to/cloned/repo/gitignore.plugin.zsh

Usage

    gi TEMPLATE (will write rules to the standard output)

Or:

    gii TEMPLATE (will write output to the local .gitignore file)

Example:

    gi vim eclipse symfony

Custom templates

If you want to override an existing template or add your own custom one, you can use an environment variable ZSH_PLUGIN_GITIGNORE_TEMPLATE_PATHS (it behaves like the $PATH variable):

    export ZSH_PLUGIN_GITIGNORE_TEMPLATE_PATHS="$HOME/.gitignore_teplates:$ZSH_PLUGIN_GITIGNORE_TEMPLATE_PATHS:/etc/global_gitignore"

Updating templates

Every day the Travis CI runs a job (see tools/update-templates) that updates a submodule with templates and commits the changes. So, templates are always up to date. You should just use antigen update.

Demo

gif

License

Copyright (c) Voronkovich Oleg. Distributed under the MIT.

You can’t perform that action at this time.