From 41a482cf5d9cd4f1bbbff12108ad545a7f820828 Mon Sep 17 00:00:00 2001 From: Kevin K Date: Tue, 10 May 2016 17:01:12 -0400 Subject: [PATCH] imp(SubCommand Aliases): adds feature to yaml configs too --- src/app/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/app/mod.rs b/src/app/mod.rs index b3db3390..dec9c72d 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -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()));