#2204

fix(cli): treat text after -- as literal in fill and type

Openbercedevwants to merge intofrom

Fixes #2171

fill and type had no way to take text that looks like an option. fill '#field' -- '--json' cleared the field: clean_args dropped --json as the global flag and parse_flags turned JSON output on. type '#field' -- '--clear' typed -- and cleared, because the type branch scans its own --clear/--delay in the remaining args.

Now -- ends option parsing:

  • parse_flags and the --config lookup stop at --, so nothing after it sets a global flag
  • clean_args keeps -- and everything after it as-is, so the command parser can see where the data starts
  • fill skips a -- right after the selector, and type takes everything after -- as text

Without -- nothing changes, so type '#field' --clear still clears.

Tests: test_end_of_options_keeps_flag_shaped_text in flags.rs and test_fill_and_type_take_text_after_end_of_options_literally in commands.rs, both fail on main. cargo test in cli/ passes except 3 tests that also fail on main in my container (test_get_socket_dir_home_fallback wants a home dir under /home or /Users, and two native::stream::http tests). cargo fmt --check is clean.

Activity

6
vercel[bot]7d ago

@bercedev is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot]reviewed7d ago
bercedevreviewed7d ago
vercel[bot]reviewed7d ago