gitignore.plugin.zsh 263 Bytes
Newer Older
Andrii Kostenko's avatar
Andrii Kostenko committed
1
function gi() { curl https://www.gitignore.io/api/$@ ;}
2

3
_gitignoreio_get_command_list() {
Andrii Kostenko's avatar
Andrii Kostenko committed
4
  curl -s https://www.gitignore.io/api/list | tr "," "\n"
5
6
}

7
_gitignoreio () {
8
  compset -P '*,'
9
  compadd -S '' `_gitignoreio_get_command_list`
10
11
}

12
compdef _gitignoreio gi