mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-02-19 10:22:45 +08:00

This commit completes previous efforts and standardizes both curl commands into using silent mode and following redirects in case the URL changes again in the future.
13 lines
268 B
Bash
13 lines
268 B
Bash
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
|