File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ use std::fmt::Write;
1111
1212use super :: commands;
1313use super :: list_commands;
14+ use super :: third_party_subcommands;
1415use super :: user_defined_aliases;
1516use crate :: command_prelude:: * ;
1617use crate :: util:: is_rustup;
@@ -729,7 +730,8 @@ fn get_toolchains_from_rustup() -> Vec<String> {
729730}
730731
731732fn get_command_candidates ( gctx : & GlobalContext ) -> Vec < clap_complete:: CompletionCandidate > {
732- let commands = user_defined_aliases ( gctx) ;
733+ let mut commands = user_defined_aliases ( gctx) ;
734+ commands. extend ( third_party_subcommands ( gctx) ) ;
733735 commands
734736 . iter ( )
735737 . map ( |( name, cmd_info) | {
@@ -745,8 +747,8 @@ fn get_command_candidates(gctx: &GlobalContext) -> Vec<clap_complete::Completion
745747 CommandInfo :: BuiltIn { .. } => {
746748 unreachable ! ( "BuiltIn command shouldn't appear in alias map" )
747749 }
748- CommandInfo :: External { .. } => {
749- unreachable ! ( "External command shouldn't appear in alias map" )
750+ CommandInfo :: External { path } => {
751+ format ! ( "from {}" , path . display ( ) )
750752 }
751753 } ;
752754 clap_complete:: CompletionCandidate :: new ( name. clone ( ) ) . help ( Some ( help_text. into ( ) ) )
You can’t perform that action at this time.
0 commit comments