@@ -331,6 +331,24 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
331 .takes_value(true)
331 .takes_value(true)
332 .value_name("width")
332 .value_name("width")
333 .hidden_short_help(true)
333 .hidden_short_help(true)
336+ let sign = t.chars().next().unwrap();
337+ let num = if (sign == '+') || (sign == '-') {
338+ t.chars().skip(1).collect()
344+ .map_err(|_e| "must be an offset or number")
345+ .and_then(|v| if v == 0 && sign != '+' && sign != '-' {
346+ Err("terminal width cannot be zero".into())
350+ .map_err(|e| e.to_string())
335 "Explicitly set the width of the terminal instead of determining it \
353 "Explicitly set the width of the terminal instead of determining it \
336 automatically. If prefixed with '+' or '-', the value will be treated \
354 automatically. If prefixed with '+' or '-', the value will be treated \