Skip to content

Instantly share code, notes, and snippets.

@timyates
timyates / .gvm_completion.sh
Last active December 17, 2015 13:49
Quick and dirty GVM bash autocompletion
_gvm_complete()
{
local CANDIDATES
COMPREPLY=()
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $(compgen -W "install uninstall rm list use current version default selfupdate broadcast offline help flush" -- ${COMP_WORDS[COMP_CWORD]}) )
elif [ $COMP_CWORD -eq 2 ]; then
case "${COMP_WORDS[COMP_CWORD-1]}" in