Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/voronkovich/gitignore.plugin.zsh
ZSH plugin for creating .gitignore files.
https://github.com/voronkovich/gitignore.plugin.zsh
gitignore zsh zsh-plugin
Last synced: 18 days ago
JSON representation
ZSH plugin for creating .gitignore files.
- Host: GitHub
- URL: https://github.com/voronkovich/gitignore.plugin.zsh
- Owner: voronkovich
- License: mit
- Created: 2014-01-16T22:23:21.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2024-04-10T19:21:01.000Z (9 months ago)
- Last Synced: 2024-04-15T00:49:03.816Z (8 months ago)
- Topics: gitignore, zsh, zsh-plugin
- Language: Shell
- Homepage:
- Size: 131 KB
- Stars: 53
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gitignore.plugin.zsh [![Build Status](https://app.travis-ci.com/voronkovich/gitignore.plugin.zsh.svg?branch=master)](https://app.travis-ci.com/github/voronkovich/gitignore.plugin.zsh)
ZSH plugin for creating `.gitignore` files.
## Installation
### [Antigen](https://github.com/zsh-users/antigen)
```sh
antigen bundle voronkovich/gitignore.plugin.zsh
```
### [Zplug](https://github.com/zplug/zplug)```sh
zplug "voronkovich/gitignore.plugin.zsh"
```### [Oh My Zsh](https://github.com/ohmyzsh/ohmyzsh)
```sh
git clone --recurse-submodules https://github.com/voronkovich/gitignore.plugin.zsh ~/.oh-my-zsh/custom/plugins/gitingore
```Edit `.zshrc` to enable the plugin:
```sh
plugins=(... gitignore)
```### Manual
Clone this repo:
```sh
git clone --recurse-submodules https://github.com/voronkovich/gitignore.plugin.zsh path/to/repo
```And add this into your `.zshrc`:
```sh
source path/to/repo/gitignore.plugin.zsh
```## Usage
```sh
# Write templates to the standard output
gi TEMPLATE# Write templates to the local .gitignore file
gii TEMPLATE# Open .gitignore file in editor ($EDITOR)
gie
```Example:
```sh
gi vim eclipse symfony
```## Global gitignore
The plugin also supports [global gitignore](https://git-scm.com/docs/gitignore#_synopsis) files. To use global gitignore file instead of local one add `--global` flag to any command:
```sh
# Output content of the global gitignore file
gi -g# Write templates to the global gitignore file
gii -g TEMPLATE# Open global gitignore file in editor ($EDITOR)
gie -g
```## 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):
```sh
export ZSH_PLUGIN_GITIGNORE_TEMPLATE_PATHS="${HOME}/.gitignore_teplates:${ZSH_PLUGIN_GITIGNORE_TEMPLATE_PATHS}:/etc/global_gitignore"
```## Updating templates
Every day the [Travis CI](https://docs.travis-ci.com/user/cron-jobs/) runs a job (see [tools/update-templates](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](http://i.imgur.com/NiaFzeh.gif)
## License
Copyright (c) Voronkovich Oleg. Distributed under the [MIT](LICENSE).