# OptionParser alias behavior

**URL:** <https://forum.elixirforum.com/t/optionparser-alias-behavior/17682>\
**Category:** Questions\
**Tags:** cli\
**Created:** [November 2, 2018, 11:54am UTC](https://forum.elixirforum.com/t/optionparser-alias-behavior/17682 "2018-11-02T11:54:12Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Phillipp](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/phillipp/32/10625_2.png) [@Phillipp](https://forum.elixirforum.com/u/Phillipp)\
**Post date:** [November 2, 2018, 12:04pm UTC](https://forum.elixirforum.com/t/optionparser-alias-behavior/17682/3 "2018-11-02T12:04:16Z")

</div>

Ah, that might explain it. So the module seems to implement that convention as well.

```elixir
iex(48)> args = ["-co", "foo"]
["-co", "foo"]
iex(49)> {switches, _, _} = OptionParser.parse(
...(49)> args,
...(49)> switches: [
...(49)> debug: :boolean,
...(49)> config_override: :string
...(49)> ],
...(49)> aliases: [
...(49)> o: :config_override
...(49)> ]
...(49)> )
{[config_override: "foo"], [], [{"-c", nil}]}

```

As you said, `-c` is ignored.

---

_[View the full topic](https://forum.elixirforum.com/t/optionparser-alias-behavior/17682)._
