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.

20 lines
558 B

  1. function _ghcup
  2. set -l cl (commandline --tokenize --current-process)
  3. # Hack around fish issue #3934
  4. set -l cn (commandline --tokenize --cut-at-cursor --current-process)
  5. set -l cn (count $cn)
  6. set -l tmpline --bash-completion-enriched --bash-completion-index $cn
  7. for arg in $cl
  8. set tmpline $tmpline --bash-completion-word $arg
  9. end
  10. for opt in (ghcup $tmpline)
  11. if test -d $opt
  12. echo -E "$opt/"
  13. else
  14. echo -E "$opt"
  15. end
  16. end
  17. end
  18. complete --no-files --command ghcup --arguments '(_ghcup)'