Deploying bash completion with cabal?

Hi All I'm looking for a good way to deploy a bash completion script somewhere appropriate for the given operating system. Has anyone tackled this before? I was considering packaging the script in to the install using cabal data files, then having an 'install--bash-completion' option that tries to detect the right place to install it depending on the OS. Cheers Jacob

That sounds like a solution that would work. An alternative is to use
the hooks available in cabal to install the completion file
immediately on 'cabal install'. See the cabal docs [1] for more
details. The downside is that you don't have a way to specify
dependencies for your Setup.hs [2], so the hooks have to be pretty
simple (you can basically only use base and ghc's bootlibs reliably).
Regards,
Erik
[1] http://hackage.haskell.org/package/Cabal-1.20.0.2/docs/Distribution-Simple.h...
[2] https://github.com/haskell/cabal/issues/948
On Sun, Sep 28, 2014 at 1:49 AM, Jacob Stanley
Hi All
I'm looking for a good way to deploy a bash completion script somewhere appropriate for the given operating system.
Has anyone tackled this before? I was considering packaging the script in to the install using cabal data files, then having an 'install--bash-completion' option that tries to detect the right place to install it depending on the OS.
Cheers Jacob
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (2)
-
Erik Hesselink
-
Jacob Stanley