You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

15 rivejä
348 B

  1. #! /bin/bash
  2. : ${PROG:=$(basename ${BASH_SOURCE})}
  3. _cli_bash_autocomplete() {
  4. local cur opts base
  5. COMPREPLY=()
  6. cur="${COMP_WORDS[COMP_CWORD]}"
  7. opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion )
  8. COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
  9. return 0
  10. }
  11. complete -F _cli_bash_autocomplete $PROG