github.com/bcampbell/scrapeomat@v0.0.0-20220820232205-23e64141c89e/scrapeomat_completion (about)

     1  # vim: set filetype=sh :
     2  #
     3  # basic tab-completion for scrapeomat
     4  #
     5  
     6  _scrapeomat()
     7  {
     8      local cmd="${1##*/}"
     9      local cur=${COMP_WORDS[COMP_CWORD]}
    10      local scrapers=$($cmd -l)
    11  
    12      COMPREPLY=( $(compgen -W "$scrapers ALL -discover" -- $cur ) );
    13  }
    14  
    15  complete -F _scrapeomat scrapeomat
    16