diff options
author | Marc Cornellà <marc.cornella@live.com> | 2019-05-08 20:40:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-08 20:40:36 +0200 |
commit | 0232ac4bb1cb64b5bfaa7e5fc979d6f7ab23e534 (patch) | |
tree | 946d9f8b758ebdd63da96152ca56b154c99068da /plugins/gitignore | |
parent | afb028763cf40fc339e49011b2cba124dc108fcb (diff) | |
parent | ebc700be9b2fa7ae770a644093a5c46a8e323726 (diff) | |
download | zsh-0232ac4bb1cb64b5bfaa7e5fc979d6f7ab23e534.tar.gz zsh-0232ac4bb1cb64b5bfaa7e5fc979d6f7ab23e534.tar.bz2 zsh-0232ac4bb1cb64b5bfaa7e5fc979d6f7ab23e534.zip |
Merge branch 'master' into master
Diffstat (limited to 'plugins/gitignore')
-rw-r--r-- | plugins/gitignore/README.md | 17 | ||||
-rw-r--r-- | plugins/gitignore/gitignore.plugin.zsh | 4 |
2 files changed, 19 insertions, 2 deletions
diff --git a/plugins/gitignore/README.md b/plugins/gitignore/README.md new file mode 100644 index 000000000..753dd31fd --- /dev/null +++ b/plugins/gitignore/README.md @@ -0,0 +1,17 @@ +# gitignore + +This plugin enables you the use of [gitignore.io](https://www.gitignore.io/) from the command line. You need an active internet connection. + +To use it, add `gitignore` to the plugins array in your zshrc file: + +```zsh +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`: Appending programming language settings to your projects .gitignore. diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh index ba1b38711..15e38d3b7 100644 --- a/plugins/gitignore/gitignore.plugin.zsh +++ b/plugins/gitignore/gitignore.plugin.zsh @@ -1,7 +1,7 @@ -function gi() { curl -sL https://www.gitignore.io/api/${(j:,:)@} } +function gi() { curl -fL https://www.gitignore.io/api/${(j:,:)@} } _gitignoreio_get_command_list() { - curl -sL https://www.gitignore.io/api/list | tr "," "\n" + curl -sfL https://www.gitignore.io/api/list | tr "," "\n" } _gitignoreio () { |