From 0f942f6738b89ec637271660ce44d56535afa187 Mon Sep 17 00:00:00 2001 From: jojii Date: Mon, 15 Mar 2021 23:28:19 +0100 Subject: [PATCH] few further improvements --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 }