ghc-pkg bash completion

Lennart Kolmodin kolmodin at dtek.chalmers.se
Thu Aug 2 14:24:53 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all!

I wrote a bash completion to ghc-pkg last year, just cleaned it up a bit
and thought I should share it with you guys.

You get your copy by typing:

; darcs get http://haskell.org/~kolmodin/code/ghc-bash-completion/

Then, to load it (quick'n'dirty without proper install):

; cd ghc-bash-completion
; source ./ghc-pkg
; source ./ghci

A session could look like:

; ghc-pkg <tab><tab>  # hit the tab key twice.
                      # it gives your valid options
- --auto-ghci-libs  --package-conf=   -V                hide
- --define-name=    --simple-output   -f                latest
- --force           --user            -g                list
- --global          --version         describe          register
- --global-conf=    -?                expose            unregister
- --help            -D                field             update

; ghc-pkg hide <tab><tab> # gives you a list of
                          # packages and optional flags

The ghci support is very minimalistic at this point... it only completes
on packages.

That's it!

Cheers,
  Lennart
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGsiF14txYG4KUCuERAnxMAJ4nzs8UPrNGevihKKVdSnsyOy3+twCgqQ0J
itCHvhD13LEE88UBjBsmXmA=
=Sndh
-----END PGP SIGNATURE-----


More information about the Glasgow-haskell-users mailing list