refactor(params): open -s and -w script files after parsing commands

This will be needed for #18375 as only the server should open the.
scriptfile, and redirected stdin fd will need to be used.

Also executing actions in the middle of command_line_scan() is cringe.
This commit is contained in:
bfredl
2022-12-16 11:27:27 +01:00
parent 72a19b2ffe
commit b6dda012ea
2 changed files with 51 additions and 33 deletions

View File

@@ -42,6 +42,9 @@ typedef struct {
char *listen_addr; // --listen {address}
int remote; // --remote-[subcmd] {file1} {file2}
char *server_addr; // --server {address}
char *scriptin; // -s {filename}
char *scriptout; // -w/-W {filename}
bool scriptout_append; // append (-w) instead of overwrite (-W)
} mparm_T;
#ifdef INCLUDE_GENERATED_DECLARATIONS