Skip to content

Instantly share code, notes, and snippets.

@lorenzhs
Created August 17, 2016 11:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lorenzhs/ad6c009f5748d333b73376e07ae88ef3 to your computer and use it in GitHub Desktop.
Save lorenzhs/ad6c009f5748d333b73376e07ae88ef3 to your computer and use it in GitHub Desktop.
# gitignore with completion
function gi() { curl -sL https://www.gitignore.io/api/$@ ;}
_gitignoreio_get_command_list() {
curl -sL https://www.gitignore.io/api/list | tr "," "\n"
}
_gitignoreio () {
compset -P '*,'
compadd -S '' `_gitignoreio_get_command_list`
}
compdef _gitignoreio gi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment