494b07b093aaaf3bdc05946cd5daae64847d4744

Author
low-ghost <lowghost.clone@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Update gitignore.plugin: comma separated arguments

Seems like this is more like the intended effect, splits arguments with commas
for proper gitignore.io api request.
Thanks for teaching me about custom compdef completions!

Updated with zsh join operator by Marc Cornellà

Diff

 1diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh
 2index 481d487bad12cf9e39fd3cf01d41234e17f94648..ba1b38711b8cda436ab91a177e4846b45c7189ca 100644
 3--- a/plugins/gitignore/gitignore.plugin.zsh
 4+++ b/plugins/gitignore/gitignore.plugin.zsh
 5@@ -1,4 +1,4 @@
 6-function gi() { curl -sL https://www.gitignore.io/api/$@ ;}
 7+function gi() { curl -sL https://www.gitignore.io/api/${(j:,:)@} }
 8 
 9 _gitignoreio_get_command_list() {
10   curl -sL https://www.gitignore.io/api/list | tr "," "\n"