diff --git a/src/main.rs b/src/main.rs index ab1ac6a..cfb5563 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,7 +51,7 @@ fn main() -> Result<(), ureq::Error> { break; } - if print_item(&options.query, entry).is_some() && i != options.limit { + if print_item(&options.query, entry).is_some() && i + 2 <= options.limit { println!(); } } @@ -239,6 +239,10 @@ fn parse_args() -> Options { ap.parse_args_or_exit(); } + if options.limit == 0 { + options.limit = 1; + } + options.query = query_vec.join(" "); options }