gitignore.plugin.zsh 284 B

123456789101112
  1. function gi() { curl -fLw '\n' https://www.gitignore.io/api/"${(j:,:)@}" }
  2. _gitignoreio_get_command_list() {
  3. curl -sfL https://www.gitignore.io/api/list | tr "," "\n"
  4. }
  5. _gitignoreio () {
  6. compset -P '*,'
  7. compadd -S '' `_gitignoreio_get_command_list`
  8. }
  9. compdef _gitignoreio gi