1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-07-01 18:39:26 +00:00

move gitignore template function to modules/git

This commit is contained in:
Haojia Che
2014-11-03 16:48:54 +08:00
parent a14b6e5c31
commit 72328d0eed
5 changed files with 51 additions and 1 deletions

View File

@ -0,0 +1,20 @@
#
# Get ignore template from https://gitignore.io.
#
# Authors:
# Haojia Che <haojia.che@gmail.com>
#
# Use `git-ignore-template` or `git-ignore-template list` to get the list
# Uset `git-ignore-template <template name>` to get the template
#
# Example:
# `git-ignore-template java` to get a gitignore template for java.
#
function git-ignore-template() {
if [ $@ ]; then
curl -L -s https://www.gitignore.io/api/$@;
else
curl -L -s https://www.gitignore.io/api/list;
fi
}