dotfiles/git/.config/zsh/completions/_gitignore

16 lines
398 B
Text
Raw Normal View History

2020-02-02 17:34:35 +00:00
#compdef _gitignore gitignore
#
# Requires gitignore script in path
#
# Enables completion for zsh of gitignore function.
_gitignore_get_command_list() {
curl -sL https://www.gitignore.io/api/list | tr ',' '\n'
}
_gitignore() {
_arguments \
'1::flags:((-f\:"Save output to .gitignore file in current directory"))' \
":listopts: _values -s, 'modules' $(_gitignore_get_command_list)"
}