CaptnCodr / Fli

Execute CLI commands from your F# code in F# style!
MIT License
147 stars 4 forks source link

Implement Zero value for computation expression. #69

Open AlexStory opened 2 weeks ago

AlexStory commented 2 weeks ago

Would it be possible to implement the Zero value for the cli computation expression? This is needed for letting other values be added conditionally.

In my current process, I'm trying to add the output logging if the user specifies a log file. and it would allow the following to happen

cli {
    Command "command"
    Arguments ["arg1"; "arg2"]

    if logPath.isSome then
        Output logPath.Value
}
CaptnCodr commented 2 weeks ago

Thank you, that looks doable. 😊