(
parser: &mut ArgParser,
shared: SharedArgs,
config: &dyn CliConfig,
)
| 363 | } |
| 364 | |
| 365 | fn parse_claude_weekly_command( |
| 366 | parser: &mut ArgParser, |
| 367 | shared: SharedArgs, |
| 368 | config: &dyn CliConfig, |
| 369 | ) -> Result<Command, String> { |
| 370 | let mut args = WeeklyArgs { |
| 371 | shared, |
| 372 | start_of_week: WeekDay::Sunday, |
| 373 | }; |
| 374 | config.apply_weekly_args(&mut args); |
| 375 | while parser.peek().is_some() { |
| 376 | if parse_shared_arg_for_command(parser, &mut args.shared)? { |
| 377 | continue; |
| 378 | } |
| 379 | match parser.next_flag()?.as_str() { |
| 380 | "-w" | "--start-of-week" => { |
| 381 | args.start_of_week = parse_week_day(&parser.value_for("--start-of-week")?)? |
| 382 | } |
| 383 | flag => return Err(format!("Unknown weekly option '{flag}'")), |
| 384 | } |
| 385 | } |
| 386 | Ok(Command::Weekly(args)) |
| 387 | } |
| 388 | |
| 389 | fn parse_claude_session_command( |
| 390 | parser: &mut ArgParser, |
no test coverage detected