diff --git a/src/mm.rs b/src/mm.rs index 6f3bfa8..b99bf9e 100644 --- a/src/mm.rs +++ b/src/mm.rs @@ -131,6 +131,11 @@ fn main() -> ExitCode { } } + if ins.is_empty() && outs.is_empty() && argv.len() > optind { + eprintln!("Usage: {}", usage); + return ExitCode::from(EX_USAGE as u8); + } + /* use stdin if no inputs are specified */ if ins.is_empty() { ins.push("-".to_string()); }