From 30531d2967e79e4e07e3c689136ad7de431f6dd8 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Thu, 13 Nov 2025 09:13:48 +1100 Subject: [PATCH] Pass 'unknown' args to the backend EDITOR --- src/mirro/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mirro/main.py b/src/mirro/main.py index 1057f26..82dfefb 100644 --- a/src/mirro/main.py +++ b/src/mirro/main.py @@ -50,7 +50,8 @@ def main(): help="Backup directory", ) - args = parser.parse_args() + # editor_extra_args are for passing straight to the EDITOR + args, editor_extra_args = parser.parse_known_args() editor = os.environ.get("EDITOR","nano") target = Path(args.file).expanduser().resolve() @@ -81,7 +82,7 @@ def main(): write_file(temp_path, original_content) # Launch editor - subprocess.call(editor_cmd + [str(temp_path)]) + subprocess.call(editor_cmd + [str(temp_path)] + editor_extra_args) # Read edited edited_content = read_file(temp_path) -- 2.49.1