@@ -65,6 +65,7 @@ impl CompleteWord {
65
65
ctx. insert ( "PREV" , & ( cword - 1 ) ) ;
66
66
67
67
let parsed = parse ( spec, words) ?;
68
+ debug ! ( "parsed cmd: {}" , parsed. cmd. full_cmd. join( " " ) ) ;
68
69
let choices = if !parsed. cmd . subcommands . is_empty ( ) {
69
70
complete_subcommands ( parsed. cmd , & ctoken)
70
71
} else if ctoken == "-" {
@@ -274,7 +275,8 @@ fn complete_subcommands(cmd: &SpecCommand, ctoken: &str) -> Vec<String> {
274
275
}
275
276
276
277
fn complete_long_flag_names ( flags : & BTreeMap < String , SpecFlag > , ctoken : & str ) -> Vec < String > {
277
- trace ! ( "complete_long_flag_names: {ctoken}" ) ;
278
+ debug ! ( "complete_long_flag_names: {ctoken}" ) ;
279
+ trace ! ( "flags: {}" , flags. keys( ) . join( ", " ) ) ;
278
280
let ctoken = ctoken. strip_prefix ( "--" ) . unwrap_or ( ctoken) ;
279
281
flags
280
282
. values ( )
@@ -288,7 +290,7 @@ fn complete_long_flag_names(flags: &BTreeMap<String, SpecFlag>, ctoken: &str) ->
288
290
}
289
291
290
292
fn complete_short_flag_names ( flags : & BTreeMap < String , SpecFlag > , ctoken : & str ) -> Vec < String > {
291
- trace ! ( "complete_short_flag_names: {ctoken}" ) ;
293
+ debug ! ( "complete_short_flag_names: {ctoken}" ) ;
292
294
let cur = ctoken. chars ( ) . nth ( 1 ) ;
293
295
flags
294
296
. values ( )
0 commit comments