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