@@ -70,9 +70,7 @@ Profiles allow you to organize and manage different sets of context files for di
7070
7171#[ derive( Debug , Clone , PartialEq , Eq ) ]
7272pub enum ContextSubcommand {
73- Show {
74- expand : bool ,
75- } ,
73+ Show ,
7674 Add {
7775 global : bool ,
7876 force : bool ,
@@ -92,8 +90,8 @@ impl ContextSubcommand {
9290 const ADD_USAGE : & str = "/context add [--global] [--force] <path1> [path2...]" ;
9391 const AVAILABLE_COMMANDS : & str = color_print:: cstr! { "<cyan!>Available commands</cyan!>
9492 <em>help</em> <black!>Show an explanation for the context command</black!>
95- <em>show [--expand]</em> <black!>Display current context configuration</black!>
96- <black!>Use --expand to list all matched files </black!>
93+
94+ <em>show</em> <black!>Display current context configuration </black!>
9795
9896 <em>add [--global] [--force] <<paths...>></em>
9997 <black!>Add file(s) to context</black!>
@@ -107,7 +105,6 @@ impl ContextSubcommand {
107105 <black!>--global: Clear global context</black!>" } ;
108106 const CLEAR_USAGE : & str = "/context clear [--global]" ;
109107 const REMOVE_USAGE : & str = "/context rm [--global] <path1> [path2...]" ;
110- const SHOW_USAGE : & str = "/context show [--expand]" ;
111108
112109 fn usage_msg ( header : impl AsRef < str > ) -> String {
113110 format ! ( "{}\n \n {}" , header. as_ref( ) , Self :: AVAILABLE_COMMANDS )
@@ -339,21 +336,8 @@ impl Command {
339336 }
340337
341338 match parts[ 1 ] . to_lowercase ( ) . as_str ( ) {
342- "show" => {
343- // Parse show command with optional --expand flag
344- let mut expand = false ;
345-
346- for part in & parts[ 2 ..] {
347- if * part == "--expand" {
348- expand = true ;
349- } else {
350- usage_err ! ( ContextSubcommand :: SHOW_USAGE ) ;
351- }
352- }
353-
354- Self :: Context {
355- subcommand : ContextSubcommand :: Show { expand } ,
356- }
339+ "show" => Self :: Context {
340+ subcommand : ContextSubcommand :: Show ,
357341 } ,
358342 "add" => {
359343 // Parse add command with paths and flags
@@ -544,11 +528,7 @@ mod tests {
544528 "/profile set p" ,
545529 profile ! ( ProfileSubcommand :: Set { name: "p" . to_string( ) } ) ,
546530 ) ,
547- ( "/context show" , context ! ( ContextSubcommand :: Show { expand: false } ) ) ,
548- (
549- "/context show --expand" ,
550- context ! ( ContextSubcommand :: Show { expand: true } ) ,
551- ) ,
531+ ( "/context show" , context ! ( ContextSubcommand :: Show ) ) ,
552532 (
553533 "/context add p1 p2" ,
554534 context ! ( ContextSubcommand :: Add {
0 commit comments