diff --git a/src/build/arg/mod.rs b/src/build/arg/mod.rs index 060b202d..41f8ec79 100644 --- a/src/build/arg/mod.rs +++ b/src/build/arg/mod.rs @@ -269,6 +269,10 @@ impl<'help> Arg<'help> { /// ``` /// [`short`]: ./struct.Arg.html#method.short pub fn short(mut self, s: char) -> Self { + if s == '-' { + panic!("short option name cannot be `-`"); + } + self.short = Some(s); self }