Hey,
I am building a CLI tool and use the OptionParser
module to parse the arguments.
Now I got a --config-override
option which accepts a string. I also wanted to have a -co
short version (alias). So this was my initial configuration:
{switches, _, _} = OptionParser.parse(
args,
switches: [
config_override: :string
],
aliases: [
co: :config_override
]
)
But then, at runtime, I got a warning:
warning: multi-letter aliases are deprecated, got: :co
Fine, I then changed the alias to just -o
:
{switches, _, _} = OptionParser.parse(
args,
switches: [
config_override: :string
],
aliases: [
o: :config_override
]
)
The weird behavior I experience is, that not only -o
works but also -co
. Where does the -co
come from?