aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2023-04-07 13:24:29 +0100
committerMatthew Wild <mwild1@gmail.com>2023-04-07 13:24:29 +0100
commit69ce40a6d2e81d23798aef4b970eb648baba6a51 (patch)
tree68e28e74e59899dedc28149b2309dc989fff5373 /util
parent8e38a4740edbed793981e8675a8589a95a5c7b01 (diff)
downloadprosody-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')
-rw-r--r--util/argparse.lua1
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