File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -704,7 +704,7 @@ See '<bright-cyan,bold>cargo help</> <cyan><<command>></>' for more information
704
704
. map ( |t| clap_complete:: CompletionCandidate :: new ( t) )
705
705
. collect :: < Vec < _ > > ( ) ;
706
706
if let Ok ( gctx) = new_gctx_for_completions ( ) {
707
- candidates. extend ( get_alias_candidates ( & gctx) ) ;
707
+ candidates. extend ( get_command_candidates ( & gctx) ) ;
708
708
}
709
709
candidates
710
710
} ) )
@@ -728,11 +728,11 @@ fn get_toolchains_from_rustup() -> Vec<String> {
728
728
stdout. lines ( ) . map ( |line| format ! ( "+{}" , line) ) . collect ( )
729
729
}
730
730
731
- fn get_alias_candidates ( gctx : & GlobalContext ) -> Vec < clap_complete:: CompletionCandidate > {
732
- let alias_map = user_defined_aliases ( gctx) ;
733
- alias_map
731
+ fn get_command_candidates ( gctx : & GlobalContext ) -> Vec < clap_complete:: CompletionCandidate > {
732
+ let commands = user_defined_aliases ( gctx) ;
733
+ commands
734
734
. iter ( )
735
- . map ( |( alias , cmd_info) | {
735
+ . map ( |( name , cmd_info) | {
736
736
let help_text = match cmd_info {
737
737
CommandInfo :: Alias { target } => {
738
738
let cmd_str = target
@@ -749,7 +749,7 @@ fn get_alias_candidates(gctx: &GlobalContext) -> Vec<clap_complete::CompletionCa
749
749
unreachable ! ( "External command shouldn't appear in alias map" )
750
750
}
751
751
} ;
752
- clap_complete:: CompletionCandidate :: new ( alias . clone ( ) ) . help ( Some ( help_text. into ( ) ) )
752
+ clap_complete:: CompletionCandidate :: new ( name . clone ( ) ) . help ( Some ( help_text. into ( ) ) )
753
753
} )
754
754
. collect ( )
755
755
}
You can’t perform that action at this time.
0 commit comments