/bash_completion.d/gcl

http://github.com/brinkman83/bashrc · #! · 30 lines · 25 code · 5 blank · 0 comment · 0 complexity · a014331eb007c97b0c8d392740589b77 MD5 · raw file

  1. # bash programmable completion for various Common Lisp implementations by
  2. # Nikodemus Siivola <nikodemus@random-state.net>
  3. have gcl &&
  4. _gcl()
  5. {
  6. local cur
  7. COMPREPLY=()
  8. cur=`_get_cword`
  9. # completing an option (may or may not be separated by a space)
  10. if [[ "$cur" == -* ]]; then
  11. COMPREPLY=( $( compgen -W '-eval -load -f -batch -dir -libdir \
  12. -compile -o-file -c-file -h-file -data-file -system-p '-- "$cur" ) )
  13. else
  14. _filedir
  15. fi
  16. return 0
  17. } &&
  18. complete -F _gcl $default gcl
  19. # Local variables:
  20. # mode: shell-script
  21. # sh-basic-offset: 4
  22. # sh-indent-comment: t
  23. # indent-tabs-mode: nil
  24. # End:
  25. # ex: ts=4 sw=4 et filetype=sh