{"action":"created","issue":{"url":"https://api.github.com/repos/kbknapp/clap-rs/issues/251","labels_url":"https://api.github.com/repos/kbknapp/clap-rs/issues/251/labels{/name}","comments_url":"https://api.github.com/repos/kbknapp/clap-rs/issues/251/comments","events_url":"https://api.github.com/repos/kbknapp/clap-rs/issues/251/events","html_url":"https://github.com/kbknapp/clap-rs/issues/251","id":106053483,"number":251,"title":"Allow configuration from config files as well","user":{"login":"wackywendell","id":245071,"avatar_url":"https://avatars.githubusercontent.com/u/245071?v=3","gravatar_id":"","url":"https://api.github.com/users/wackywendell","html_url":"https://github.com/wackywendell","followers_url":"https://api.github.com/users/wackywendell/followers","following_url":"https://api.github.com/users/wackywendell/following{/other_user}","gists_url":"https://api.github.com/users/wackywendell/gists{/gist_id}","starred_url":"https://api.github.com/users/wackywendell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wackywendell/subscriptions","organizations_url":"https://api.github.com/users/wackywendell/orgs","repos_url":"https://api.github.com/users/wackywendell/repos","events_url":"https://api.github.com/users/wackywendell/events{/privacy}","received_events_url":"https://api.github.com/users/wackywendell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kbknapp/clap-rs/labels/C:%20app","name":"C: app","color":"fad8c7"},{"url":"https://api.github.com/repos/kbknapp/clap-rs/labels/T:%20RFC%20/%20question","name":"T: RFC / question","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-11T17:04:38Z","updated_at":"2015-09-11T19:56:06Z","closed_at":null,"body":"For example, imagine you have a program `foobar` that has many configuration options. You want them to be available on the command-line, but you also want to allow users to write a `.foobarrc` (perhaps in TOML format) so that they can pre-specify their choices. Or maybe there might be multiple configuration files, one in the home directory (`$HOME/.foobarrc`), one in the current directory (`./.foobarrc`), and maybe even one specified on the command-line.\r\n\r\nIf this is outside the scope of this library, perhaps adding more ways to extract information from an `App` (such as `get_names(&self) -> [&str]`, which would list all the names of the arguments defined) would allow someone else to build this.\r\n\r\nI ask because I am building an application that could use something like this - [ParView](https://github.com/wackywendell/parview) - and I can't find a good way to do this without having to write every config option in multiple places."},"comment":{"url":"https://api.github.com/repos/kbknapp/clap-rs/issues/comments/139647185","html_url":"https://github.com/kbknapp/clap-rs/issues/251#issuecomment-139647185","issue_url":"https://api.github.com/repos/kbknapp/clap-rs/issues/251","id":139647185,"user":{"login":"sru","id":2485892,"avatar_url":"https://avatars.githubusercontent.com/u/2485892?v=3","gravatar_id":"","url":"https://api.github.com/users/sru","html_url":"https://github.com/sru","followers_url":"https://api.github.com/users/sru/followers","following_url":"https://api.github.com/users/sru/following{/other_user}","gists_url":"https://api.github.com/users/sru/gists{/gist_id}","starred_url":"https://api.github.com/users/sru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sru/subscriptions","organizations_url":"https://api.github.com/users/sru/orgs","repos_url":"https://api.github.com/users/sru/repos","events_url":"https://api.github.com/users/sru/events{/privacy}","received_events_url":"https://api.github.com/users/sru/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T19:56:06Z","updated_at":"2015-09-11T19:56:06Z","body":"I am not sure whether this is in the scope of this library or not. @kbknapp could comment on this.\r\n\r\nMaybe you could use `.validator()` method on `Arg`, [here](http://kbknapp.github.io/clap-rs/clap/struct.Arg.html#method.validator) is the doc."}}