Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (31 sloc) 760 Bytes
#!bash
#
# Bash completion for gibo
#
# INSTALLATION
#
# First install gibo from
# https://github.com/simonwhitaker/gitignore-boilerplates
#
# Then copy this file into a bash_completion.d folder:
#
# /etc/bash_completion.d
# /usr/local/etc/bash_completion.d
# ~/bash_completion.d
#
# or copy it somewhere (e.g. ~/.gibo-completion.bash) and put the
# following in your .bashrc:
#
# source ~/.gibo-completion.bash
#
# CREDITS
#
# Written by Simon Whitaker <sw@netcetera.org>
_gibo()
{
local cur opts
opts=$( find ${GIBO_BOILERPLATES:-"$HOME/.gitignore-boilerplates"} -name "*.gitignore" -exec basename \{\} .gitignore \; )
cur="${COMP_WORDS[COMP_CWORD]}"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
}
complete -F _gibo gibo