Skip to content

Commit 88d385e

Browse files
factorydroidechobt
authored andcommitted
fix(cortex-cli): consolidate mcp list command with ls alias
Fixes bounty issue #1399 The mcp subcommands had both 'list' and 'ls' as separate variants in the McpSubcommand enum. This caused the help output to show them as separate commands instead of documenting 'ls' as an alias for 'list'. This fix removes the redundant Ls variant and adds visible_alias='ls' to the List variant so the help correctly shows 'ls' as an alias.
1 parent 44a4c7a commit 88d385e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

cortex-cli/src/mcp_cmd.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,8 @@ pub struct McpCli {
256256
#[derive(Debug, clap::Subcommand)]
257257
pub enum McpSubcommand {
258258
/// List configured MCP servers.
259-
List(ListArgs),
260-
261-
/// List configured MCP servers (alias for list).
262259
#[command(visible_alias = "ls")]
263-
Ls(ListArgs),
260+
List(ListArgs),
264261

265262
/// Show details for a configured MCP server.
266263
Get(GetArgs),
@@ -447,7 +444,7 @@ impl McpCli {
447444
} = self;
448445

449446
match subcommand {
450-
McpSubcommand::List(args) | McpSubcommand::Ls(args) => run_list(args).await,
447+
McpSubcommand::List(args) => run_list(args).await,
451448
McpSubcommand::Get(args) => run_get(args).await,
452449
McpSubcommand::Add(args) => run_add(args).await,
453450
McpSubcommand::Remove(args) => run_remove(args).await,

0 commit comments

Comments
 (0)