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

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

_gitignireio () {
8
9
  compset -P '*,'
  compadd -S '' `_gitignireio_get_command_list`
10
11
}

Alexander Hramov's avatar
Alexander Hramov committed
12
compdef _gitignireio gi