@@ -1092,8 +1092,9 @@ enum ProviderProfileCommands {
10921092 /// Delete a custom provider profile.
10931093 #[ command( help_template = LEAF_HELP_TEMPLATE , next_help_heading = "FLAGS" ) ]
10941094 Delete {
1095- /// Provider profile id.
1096- id : String ,
1095+ /// Provider profile id(s).
1096+ #[ arg( required = true , num_args = 1 .., value_name = "ID" ) ]
1097+ ids : Vec < String > ,
10971098
10981099 /// Target platform-scoped profile (ignores --workspace).
10991100 #[ arg( long) ]
@@ -3626,10 +3627,10 @@ async fn run_async() -> Result<()> {
36263627 )
36273628 . await ?;
36283629 }
3629- ProviderProfileCommands :: Delete { id , global } => {
3630+ ProviderProfileCommands :: Delete { ids , global } => {
36303631 run:: provider_profile_delete (
36313632 endpoint,
3632- & id ,
3633+ & ids ,
36333634 profile_workspace ( global) ,
36343635 & tls,
36353636 )
@@ -4577,17 +4578,23 @@ mod tests {
45774578 } ) if id == "custom-api"
45784579 ) ) ;
45794580
4580- let delete =
4581- Cli :: try_parse_from ( [ "openshell" , "provider" , "profile" , "delete" , "custom-api" ] )
4582- . expect ( "provider profile delete should parse" ) ;
4581+ let delete = Cli :: try_parse_from ( [
4582+ "openshell" ,
4583+ "provider" ,
4584+ "profile" ,
4585+ "delete" ,
4586+ "custom-api" ,
4587+ "custom-alt" ,
4588+ ] )
4589+ . expect ( "provider profile delete should parse" ) ;
45834590 assert ! ( matches!(
45844591 delete. command,
45854592 Some ( Commands :: Provider {
45864593 command: Some ( ProviderCommands :: Profile ( ProviderProfileCommands :: Delete {
4587- id ,
4594+ ids ,
45884595 ..
45894596 } ) )
4590- } ) if id == "custom-api"
4597+ } ) if ids == vec! [ "custom-api" . to_string ( ) , "custom-alt" . to_string ( ) ]
45914598 ) ) ;
45924599 }
45934600
0 commit comments