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.
 
 
 
 

12 lines
216 B

  1. _ghcup()
  2. {
  3. local cur
  4. COMPREPLY=()
  5. cur="${COMP_WORDS[COMP_CWORD]}"
  6. if [[ ${#COMP_WORDS[*]} -le 2 ]]; then
  7. COMPREPLY=($(compgen -W "$(ghcup --list-commands)" -- $cur))
  8. fi
  9. return 0
  10. } &&
  11. complete -F _ghcup ghcup