Commit a8e1e29
fix: save_as_session --save-only flag now works when path comes before the flag
The CLI parser (parse_cli_from_spec) stops at the first non-option argument
(POSIX-style), so when users wrote `save_as_session /path --save-only`,
the --save-only flag was placed in the leftover args and never parsed.
Fix parse_save_as_options_spec_args to reorder args before parsing, ensuring
all option flags appear before positional arguments. Also properly handles
value-taking options (--match, --base-dir) that may appear after the path.
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/046a1de7-ad0d-46a5-8383-c06025d1d4eb
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>1 parent e7aa197 commit a8e1e29
1 file changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
712 | | - | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
713 | 735 | | |
714 | 736 | | |
715 | 737 | | |
| |||
0 commit comments