@@ -439,7 +439,7 @@ impl<'a, 'b> Parser<'a, 'b>
439
439
}
440
440
441
441
pub fn needs_flags_tag ( & self ) -> bool {
442
- debugln ! ( "exec =needs_flags_tag;" ) ;
442
+ debugln ! ( "fn =needs_flags_tag;" ) ;
443
443
' outer: for f in & self . flags {
444
444
debugln ! ( "iter;f={};" , f. name) ;
445
445
if let Some ( l) = f. long {
@@ -763,7 +763,10 @@ impl<'a, 'b> Parser<'a, 'b>
763
763
764
764
let mut reqs_validated = false ;
765
765
if let Some ( a) = needs_val_of {
766
+ debugln ! ( "needs_val_of={}" , a) ;
767
+ debug ! ( "Is this an opt..." ) ;
766
768
if let Some ( o) = self . opts . iter ( ) . find ( |o| & o. name == & a) {
769
+ sdebugln ! ( "Yes" ) ;
767
770
try!( self . validate_required ( matcher) ) ;
768
771
reqs_validated = true ;
769
772
let should_err = if let Some ( v) = matcher. 0 . args . get ( & * o. name ) {
@@ -777,6 +780,8 @@ impl<'a, 'b> Parser<'a, 'b>
777
780
self . color ( ) ) ) ;
778
781
}
779
782
} else {
783
+ sdebugln ! ( "No" ) ;
784
+ debugln ! ( "Returning Error::empty_value" ) ;
780
785
return Err ( Error :: empty_value ( self . positionals
781
786
. values ( )
782
787
. find ( |p| & p. name == & a)
@@ -846,15 +851,15 @@ impl<'a, 'b> Parser<'a, 'b>
846
851
}
847
852
848
853
fn propogate_help_version ( & mut self ) {
849
- debugln ! ( "exec =propogate_help_version;" ) ;
854
+ debugln ! ( "fn =propogate_help_version;" ) ;
850
855
self . create_help_and_version ( ) ;
851
856
for sc in & mut self . subcommands {
852
857
sc. p . propogate_help_version ( ) ;
853
858
}
854
859
}
855
860
856
861
fn build_bin_names ( & mut self ) {
857
- debugln ! ( "exec =build_bin_names;" ) ;
862
+ debugln ! ( "fn =build_bin_names;" ) ;
858
863
for sc in & mut self . subcommands {
859
864
debug ! ( "bin_name set..." ) ;
860
865
if sc. p . meta . bin_name . is_none ( ) {
@@ -992,7 +997,7 @@ impl<'a, 'b> Parser<'a, 'b>
992
997
}
993
998
994
999
fn groups_for_arg ( & self , name : & str ) -> Option < Vec < & ' a str > > {
995
- debugln ! ( "fn=groups_for_arg;" ) ;
1000
+ debugln ! ( "fn=groups_for_arg; name={}" , name ) ;
996
1001
997
1002
if self . groups . is_empty ( ) {
998
1003
debugln ! ( "No groups defined" ) ;
@@ -1149,14 +1154,14 @@ impl<'a, 'b> Parser<'a, 'b>
1149
1154
fn check_for_help_and_version_char ( & self , arg : char ) -> ClapResult < ( ) > {
1150
1155
debug ! ( "Checking if -{} is help or version..." , arg) ;
1151
1156
if let Some ( h) = self . help_short {
1152
- sdebugln ! ( "Help" ) ;
1153
1157
if arg == h && self . settings . is_set ( AppSettings :: NeedsLongHelp ) {
1158
+ sdebugln ! ( "Help" ) ;
1154
1159
try!( self . _help ( ) ) ;
1155
1160
}
1156
1161
}
1157
1162
if let Some ( v) = self . version_short {
1158
- sdebugln ! ( "Help" ) ;
1159
1163
if arg == v && self . settings . is_set ( AppSettings :: NeedsLongVersion ) {
1164
+ sdebugln ! ( "Version" ) ;
1160
1165
try!( self . _version ( ) ) ;
1161
1166
}
1162
1167
}
@@ -1862,7 +1867,7 @@ impl<'a, 'b> Parser<'a, 'b>
1862
1867
// Should we color the output? None=determined by output location, true=yes, false=no
1863
1868
#[ doc( hidden) ]
1864
1869
pub fn color ( & self ) -> ColorWhen {
1865
- debugln ! ( "exec =color;" ) ;
1870
+ debugln ! ( "fn =color;" ) ;
1866
1871
debug ! ( "Color setting..." ) ;
1867
1872
if self . is_set ( AppSettings :: ColorNever ) {
1868
1873
sdebugln ! ( "Never" ) ;
0 commit comments