diff options
author | Matthew Wild <mwild1@gmail.com> | 2023-04-07 13:24:29 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2023-04-07 13:24:29 +0100 |
commit | 69ce40a6d2e81d23798aef4b970eb648baba6a51 (patch) | |
tree | 68e28e74e59899dedc28149b2309dc989fff5373 /util/argparse.lua | |
parent | 8e38a4740edbed793981e8675a8589a95a5c7b01 (diff) | |
download | prosody-69ce40a6d2e81d23798aef4b970eb648baba6a51.tar.gz prosody-69ce40a6d2e81d23798aef4b970eb648baba6a51.zip |
util.argparse: Translate '-' to '_' in long option names for convenience
A review of existing code suggests nothing will break. So, here we go...
Diffstat (limited to 'util/argparse.lua')
-rw-r--r-- | util/argparse.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/util/argparse.lua b/util/argparse.lua index 9ece050a..bd4eb220 100644 --- a/util/argparse.lua +++ b/util/argparse.lua @@ -44,6 +44,7 @@ local function parse(arg, config) param_k, param_v = param, true; end end + param_k = param_k:gsub("%-", "_"); end parsed_opts[param_k] = param_v; end |