ohmyzsh/plugins/gitignore/gitignore.plugin.zsh
Zbigniew Mandziejewicz 2f84f493a0 Change schema to https in gitignore plugin
Request to http://www.gitignore.io returns 301 since cloudflare moved away from http to https schema.
Using curl -L (use location header) might be unsafe therefore I simply updated URL.
2014-11-01 17:59:17 +08:00

12 lines
263 B
Bash

function gi() { curl https://www.gitignore.io/api/$@ ;}
_gitignireio_get_command_list() {
curl -s https://www.gitignore.io/api/list | tr "," "\n"
}
_gitignireio () {
compset -P '*,'
compadd -S '' `_gitignireio_get_command_list`
}
compdef _gitignireio gi