Closed sykloid closed 2 years ago
Hi @sykora,
Thank you for the awesome PR! Is there any reason that parse_config_files_with_shlex
should be a flag rather than being enabled all of the time? It seems like a direct improvement rather than an alternative.
Best, Jesse and Kyle
@martinjm97 I wouldn't mind making parse_config_files_with_shlex
the default behavior and removing the flag, I certainly plan to have it turned on at all times. I just didn't want to presume so, since it would break (some rather odd cases of) backwards compatibility.
If you want, I can submit another MR removing the flag and making it the default behavior.
@sykora,
What do you think about making the default behavior what is now parse_config_files_with_shlex
and then having a skip_config_file_parse
that turns off the shlex parsing?
This will mitigate the (I assume) rare issues with backwards compatibility, and improve the default to one that allows for commenting in configs.
Thanks again!
I find it useful to have the ability to use some common shlex-isms in my config files, namely quoted strings and comments.
This patch adds that facility if the user passes
parse_config_files_with_shlex
toparse_args
.I'm happy to make any requested aesthetic changes (parameter names, etc.).
The current implemented approach is programmatically backwards-compatible.