@@ -65,6 +65,7 @@ impl CompleteWord {
6565 ctx. insert ( "PREV" , & ( cword - 1 ) ) ;
6666
6767 let parsed = parse ( spec, words) ?;
68+ debug ! ( "parsed cmd: {}" , parsed. cmd. full_cmd. join( " " ) ) ;
6869 let choices = if !parsed. cmd . subcommands . is_empty ( ) {
6970 complete_subcommands ( parsed. cmd , & ctoken)
7071 } else if ctoken == "-" {
@@ -274,7 +275,8 @@ fn complete_subcommands(cmd: &SpecCommand, ctoken: &str) -> Vec<String> {
274275}
275276
276277fn 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( ", " ) ) ;
278280 let ctoken = ctoken. strip_prefix ( "--" ) . unwrap_or ( ctoken) ;
279281 flags
280282 . values ( )
@@ -288,7 +290,7 @@ fn complete_long_flag_names(flags: &BTreeMap<String, SpecFlag>, ctoken: &str) ->
288290}
289291
290292fn 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}" ) ;
292294 let cur = ctoken. chars ( ) . nth ( 1 ) ;
293295 flags
294296 . values ( )
0 commit comments