@@ -1139,6 +1139,12 @@ impl<'a> From<&'a Yaml> for App<'a, 'a> {
1139
1139
if let Some ( v) = yaml[ "about" ] . as_str ( ) {
1140
1140
a = a. about ( v) ;
1141
1141
}
1142
+ if let Some ( v) = yaml[ "before_help" ] . as_str ( ) {
1143
+ a = a. before_help ( v) ;
1144
+ }
1145
+ if let Some ( v) = yaml[ "template" ] . as_str ( ) {
1146
+ a = a. template ( v) ;
1147
+ }
1142
1148
if let Some ( v) = yaml[ "after_help" ] . as_str ( ) {
1143
1149
a = a. after_help ( v) ;
1144
1150
}
@@ -1157,20 +1163,46 @@ impl<'a> From<&'a Yaml> for App<'a, 'a> {
1157
1163
if let Some ( v) = yaml[ "version_short" ] . as_str ( ) {
1158
1164
a = a. version_short ( v) ;
1159
1165
}
1166
+ if let Some ( v) = yaml[ "setting" ] . as_str ( ) {
1167
+ a = a. setting ( v. parse ( ) . ok ( ) . expect ( "unknown AppSetting found in YAML file" ) ) ;
1168
+ }
1160
1169
if let Some ( v) = yaml[ "settings" ] . as_vec ( ) {
1161
1170
for ys in v {
1162
1171
if let Some ( s) = ys. as_str ( ) {
1163
1172
a = a. setting ( s. parse ( ) . ok ( ) . expect ( "unknown AppSetting found in YAML file" ) ) ;
1164
1173
}
1165
1174
}
1166
1175
}
1176
+ if let Some ( v) = yaml[ "global_setting" ] . as_str ( ) {
1177
+ a = a. setting ( v. parse ( ) . ok ( ) . expect ( "unknown AppSetting found in YAML file" ) ) ;
1178
+ }
1179
+ if let Some ( v) = yaml[ "global_settings" ] . as_vec ( ) {
1180
+ for ys in v {
1181
+ if let Some ( s) = ys. as_str ( ) {
1182
+ a = a. global_setting ( s. parse ( ) . ok ( ) . expect ( "unknown AppSetting found in YAML file" ) ) ;
1183
+ }
1184
+ }
1185
+ }
1186
+ if let Some ( v) = yaml[ "alias" ] . as_str ( ) {
1187
+ a = a. alias ( v) ;
1188
+ }
1167
1189
if let Some ( v) = yaml[ "aliases" ] . as_vec ( ) {
1168
1190
for ys in v {
1169
1191
if let Some ( s) = ys. as_str ( ) {
1170
1192
a = a. alias ( s) ;
1171
1193
}
1172
1194
}
1173
1195
}
1196
+ if let Some ( v) = yaml[ "visible_alias" ] . as_str ( ) {
1197
+ a = a. visible_alias ( v) ;
1198
+ }
1199
+ if let Some ( v) = yaml[ "visible_aliases" ] . as_vec ( ) {
1200
+ for ys in v {
1201
+ if let Some ( s) = ys. as_str ( ) {
1202
+ a = a. visible_alias ( s) ;
1203
+ }
1204
+ }
1205
+ }
1174
1206
if let Some ( v) = yaml[ "args" ] . as_vec ( ) {
1175
1207
for arg_yaml in v {
1176
1208
a = a. arg ( Arg :: from_yaml ( & arg_yaml. as_hash ( ) . unwrap ( ) ) ) ;
0 commit comments