Module RargInternal.Run
type runAction('a)
= (Stdlib.result(Cmd.Action.t, Cmd.Err.t), Cmd.t('a), Cmd.argsMap)
;
let getRunAction: cmd:Cmd.t('a) => argsMap:Cmd.argsMap => runAction('a);
Follow the sub commands tree and return the action that should be taken
module RunResult: { ... };
A simplified run result. It contains the ready to print strings for help, suggest and etc.
let simplify: runAction:runAction('a) => ?shell:Seed.Process.Shell.t => ?platform:Seed.Os.Platform.t => args:array(string) => appName:string => appPath:string => unit => RunResult.t('a);
Simplifies a run action by returning the concrete strings to be printed for help, suggestions and etc.
module AutorunResult: { ... };
The result of an
autorun
let autorun: ?logo:string => Cmd.t('a) => AutorunResult.t('a);
Autorun checks the requested action and handles all actions (for example prints help) except
run
, which needs to be handled by the user code. This makes it trivial to use custom return types, use your own exit codes, or use an async library likelwt
.