# minimalistic :) ghci command line completion for bash # # Copyright 2006 Lennart Kolmodin _ghci() { local cur prev cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} COMPREPLY=() if [[ "$prev" == "-package" ]]; then COMPREPLY=( $( compgen -W "$(_ghc-pkg-pkgs include-{pkgs,ids})" -- $cur ) ) else COMPREPLY=( $( compgen -W "-package" -- $cur ) ) fi } complete -F _ghci -o default ghci