bash_completion 557 B

12345678910111213141516171819202122232425262728293031
  1. # claws-mail(1) completion
  2. _claws-mail()
  3. {
  4. local cur prev words cword
  5. _init_completion || return
  6. case $prev in
  7. --help|-h|--version|-v|--version-full|-V)
  8. return
  9. ;;
  10. --alternate-config-dir)
  11. COMPREPLY=( $( find . -maxdepth 2 -name clawsrc | sed 's,/clawsrc,,' ) )
  12. return
  13. ;;
  14. --select|--status|--status-full)
  15. _filedir -d
  16. return
  17. ;;
  18. --compose-from-file|--attach)
  19. _filedir
  20. return
  21. ;;
  22. esac
  23. if [[ $cur == -* ]]; then
  24. COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
  25. return
  26. fi
  27. } &&
  28. complete -F _claws-mail claws-mail