Perhaps it's best to accept any extra args after the file itself, and pass them straight to the EDITOR (don't try to operate on them at the mirro level).
In bash this would be something like $EDITOR $* (single string of args) or $EDITOR $@ (array of args) . In your case, since you're using subprocess, you can probably pass the array of args down to the subprocess call easily enough.
My EDITOR is vim.
If I open a file but pass an argument like +695 (jump to line 695), vim will take me to that line:
```
vim bouquin/markdown_editor.py +695
```
But if I use mirro, the extra argument is rejected and the app doesn't open:
```
user@vpn-ssh:~/git/bouquin$ mirro bouquin/markdown_editor.py +695
usage: mirro [-h] [--backup-dir BACKUP_DIR] file
mirro: error: unrecognized arguments: +695
```
Perhaps it's best to accept any extra args after the file itself, and pass them straight to the EDITOR (don't try to operate on them at the mirro level).
In bash this would be something like `$EDITOR $*` (single string of args) or `$EDITOR $@` (array of args) . In your case, since you're using subprocess, you can probably pass the array of args down to the subprocess call easily enough.
The tool isn’t really designed to handle editor arguments directly, it’s meant to behave like an unencrypted version of SOPS where all extra flags and positioning logic are handled by the editor itself through $EDITOR.
That said, I’ll keep this open for now. If I find a clean, dynamic way to support this kind of usage without adding editor-specific logic, I’ll revisit it.
Thank you for bringing this up.
The tool isn’t really designed to handle editor arguments directly, it’s meant to behave like an unencrypted version of SOPS where all extra flags and positioning logic are handled by the editor itself through `$EDITOR`.
That said, I’ll keep this open for now. If I find a clean, dynamic way to support this kind of usage without adding editor-specific logic, I’ll revisit it.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
My EDITOR is vim.
If I open a file but pass an argument like +695 (jump to line 695), vim will take me to that line:
But if I use mirro, the extra argument is rejected and the app doesn't open:
Perhaps it's best to accept any extra args after the file itself, and pass them straight to the EDITOR (don't try to operate on them at the mirro level).
In bash this would be something like
$EDITOR $*(single string of args) or$EDITOR $@(array of args) . In your case, since you're using subprocess, you can probably pass the array of args down to the subprocess call easily enough.Thank you for bringing this up.
The tool isn’t really designed to handle editor arguments directly, it’s meant to behave like an unencrypted version of SOPS where all extra flags and positioning logic are handled by the editor itself through
$EDITOR.That said, I’ll keep this open for now. If I find a clean, dynamic way to support this kind of usage without adding editor-specific logic, I’ll revisit it.