Closed chrisdone closed 9 years ago
I've got it working so that it discovers and runs the appropriate submodules, and verified this with a fake stackage-init
on my path. (It also picked up the fact that there was a stackage-server
on my path, which I had quite forgotten about and subsequently removed.) There's some work that needs to be done wrt allowing interactive submodules to interact. Currently the submodule is called with an empty stdin and is not hooked up to the "real" stdin.
All plugin commands should provide some way of printing out one line of summary of what the command does.
Done. I've chosen --summary
. Building your app with Stackage.CLI.simpleOptions
will generate this flag for you.
it may be good to put the code for finding and running plugins in the stackage-cli library and have the executable really be a trivial 10 liner Main.hs.
Done. Plugins can be found via discoverSubmodulesOf stackageModule
, both identifiers exported by Stackage.CLI
.
The executable target
stackage
in thestackage-cli
package is a Git-inspired plugin system. It will do nothing other than launch other programs and list help.stackage <x>
where the command to run is determined by looking forstackage-<x>
in thePATH
.stackage --help
will also list all commands prefixed withstackage-
.stackage --help
to nicely display the available commands. This tool will importStackage.CLI
(#2) to determine what argument should be passed to the program to get a line of summary.For better use by other Haskell code, it may be good to put the code for finding and running plugins in the stackage-cli library and have the executable really be a trivial 10 liner Main.hs.
Also: Make an alias which just re-uses
Main.hs
calledstk
.