Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value source. #52

Open
dbuenzli opened this issue Apr 21, 2016 · 0 comments
Open

Value source. #52

dbuenzli opened this issue Apr 21, 2016 · 0 comments

Comments

@dbuenzli
Copy link
Owner

W.r.t. env and cli support it is sometimes annoying not to be able to know where the value was actually specified; and this would only worsen with #35.

Still most of the time you may not care so the current interface seems right, most of the time. For these other cases, we could expose a lower-level converter whose parser type is:

[`Env | `Conf | `Cli ] -> string -> ('a, [`Msg of string]) result 

It would then be trivial to expose higher-order combinators that make use of the current converters that allow to tuple the value with the source e.g.:

val source : 'a Arg.converter -> ('a * [`Default | `Env | `Conf | `Cli]) Arg.converter

But for this cmdliner needs a full internal rewrite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant