imp(SubCommand Aliases): adds feature to yaml configs too

This commit is contained in:
Kevin K 2016-05-10 17:01:12 -04:00
parent 1de71c0058
commit 41a482cf5d

View file

@ -974,6 +974,13 @@ impl<'a> From<&'a Yaml> for App<'a, 'a> {
}
}
}
if let Some(v) = yaml["aliases"].as_vec() {
for ys in v {
if let Some(s) = ys.as_str() {
a = a.alias(s);
}
}
}
if let Some(v) = yaml["args"].as_vec() {
for arg_yaml in v {
a = a.arg(Arg::from_yaml(&arg_yaml.as_hash().unwrap()));